go to post Stefan Cronje · Jul 19 Tried it out, but id does not indicate when a method call or class is deprecated.
go to post Stefan Cronje · Jul 19 Thank you. I will check it out. Doing one by one is a bit impractical as I have around 5200 classes in the project.
go to post Stefan Cronje · Apr 5 I have also been playing around now with SQL inserts and updates to see how the DB reacts to uncommitted data. If I insert a record after a tstart and it has not been committed yet, then in another session I set IsolationMode to 1 and do a select on the table for that specific record. It does not give me an SQL 100 as I would have expected. It is a new record and hasn't been committed yet.What it did give is -114 (Unable to get Shared Lock), BUT the values were still put into the binded variables I selected into. With an update the same thing. I got a SQLCODE of -114, but the new values were actually put into the binded variables. I guess there is no real uncommitted data functionality then.
go to post Stefan Cronje · Apr 5 I do want it in the Transaction. If the commit of the records related to this event being published fails, this event should not be rolled back too. Problem is that it may have been picked up by the other process already. I like the idea of using the PPG and merge after the commit. This does however add more complexity to the code in "remembering" to do the merge after the commit.
go to post Stefan Cronje · Feb 24 What happens if you add: AR=S, to the front of the reply code actions?
go to post Stefan Cronje · Jan 12 Here is an example of this concept working. On Ensemble, but should be the same for IRIS.Note that I configured password authentication on the web application and set up Authentication on Postman. Code: Class Tests.RESTFormData Extends %CSP.REST { ClassMethod Test() As %Status { w "Posting: ",$Get(%request.Data("Posting",1)) q 1 } XData UrlMap { <Routes> <Route Url="/" Method="POST" Call="Test" /> </Routes> } } Web Application Config: Postman:
go to post Stefan Cronje · Jan 12 Can you post the raw request message of Postman here please?Or the complete request sent, including the headers?
go to post Stefan Cronje · Jan 11 I want the class route. I did a lot of abstraction for the UI, like the page header, sidebar (menu) and footer. Re-usable classes for each of these page sections, as well as being able to create a "template" page to extend from, then let each specific page add its content into it. I also needed security on menu items and resource access control across pages, so abstraction made sense. I did it a bit like you would with Django templates. I might post an example of how I did this at some point. I used the Material Dashboard Pro UI framework, so I can't share that specific content due to copyright issues on the CSS and JS included.
go to post Stefan Cronje · Jan 11 Can you provide the full class? Including what it extends and so forth? Also the code of where you construct and send the request. The following is a working example of uploading a file using a CSP Page. Class Test.FileUpload Extends %CSP.Page { ClassMethod OnPage() As %Status { &html<<html> <head> </head> <body>> If %request.Method = "POST" { Set tFile = ##class(%Stream.FileBinary).%New() Set tSC = tFile.LinkToFile("C:\Tmp\" _ %request.MimeData("FileStream",1).FileName) If 'tSC { Write !,"Upload Failed" } Else { Do tFile.CopyFrom(%request.MimeData("FileStream",1)) Set tSC = tFile.%Save() If 'tSC { Write !,"Upload Failed" Do tFile.%Close() } Else { Write !,"File Posted",! } } } &html< <h2>Upload a File</h2> <form enctype="multipart/form-data" method="post" action=""> Enter a file to upload here: <input type=file size=30 name=FileStream> <hr /> <ul><input type="submit" value="Upload file"></ul> </form> </body> </html>> Quit $$$OK } }
go to post Stefan Cronje · Jan 11 I have found some information on this, which was highlighted by another issue we had. gmheap | Configuration Parameter File Reference | InterSystems IRIS Data Platform 2023.3 The gmheap setting was too small. Someone else might find this helpful in the future.
go to post Stefan Cronje · Dec 22, 2023 Thank you. I will try this. I will dig a bit deeper. All the processes run under one of the built-in system users. So if I can get the contending PID, then I can try and get that PID's info to log.
go to post Stefan Cronje · Dec 21, 2023 I haven't considered it. It is not a deadlock. An update fails in a process, I log the exception, and the process moves on to the next record to process. This sometimes happens when batch runs occur between 00:00 and 05:00 AM. When that exception occurs, I need it to programmatically find the contending process' information and the node locked, to log that information so that I can investigate it at a later time.
go to post Stefan Cronje · Nov 16, 2023 Hi, I am not sure I know what the issue is exactly. Is it speed, is it DB writes, or memory (FRAMESTACK) errors. In the meantime, some things we've done to help with large files. Increase your Per Process Memory allocation. If there is an iteration (for loop) in the DTL, at the end of the loop, unswizzle the record that was just used to free up memory. https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=EDTL_other#EDTL_foreach_unload_target In the BPL, for speed increases and fewer database writes, set the Parameter SKIPMESSAGEHISTORY to 1. We have BPL's that process CSV files with 100k rows, and these things helped.
go to post Stefan Cronje · Nov 6, 2023 Agree. Use the default settings. They can be inserted with SQL statements. Also, if you want to add Configuration Items to the Production post deployment, without having to recompile or change the production manually, use a session script, or create a classmethod or routine that can import a CSV containing the relevant information. E.g. &sql( INSERT INTO Ens_Config.DefaultSettings (Deployable, Description, HostClassName, ItemName, ProductionName, SettingName, SettingValue) VALUES (1, 'My setting description', 'My.Operation', 'My Nifty Operation', 'My.Production', 'TheSetting', 'SettingValue')) and for the Production: Set tProduction = ##class(Ens.Config.Production).%OpenId("My.Production") Set tObj = ##class(Ens.Config.Item).%New() Set tObj.Name = "My Nifty Operation" Set tObj.ClassName = "My.Operation" Set tObj.PoolSize = 1 Set tObj.Enabled = 1 Set tObj.LogTraceEvents = 0 Set tSC = tProduction.Items.Insert(tObj) Set tSC = tProduction.%Save() w $System.Status.GetErrorText(tSC) Set tSC = ##class(Ens.Director).UpdateProduction() w $System.Status.GetErrorText(tSC) You can also open existing confiritems in order to update the Pool Size or any of those other settings that are not configurable in the "System Default Settings" for some reason.
go to post Stefan Cronje · Feb 23, 2023 That is helpful, thank you. I just find it strange that it is quite non-standard compared to other compilers/interpreters
go to post Stefan Cronje · Feb 18, 2023 Hi, There is an item on the InterSystems Ideas portal for this. You can go vote for it if you want to. But currently, it is not a built-in feature.
go to post Stefan Cronje · Feb 14, 2023 Not currently that I am aware of. There is the Installer Manifest you can use to automate a lot of this during deployment, but there is no export to create such a manifest. Maybe add this as an Idea on InterSystems Ideas...
go to post Stefan Cronje · Feb 12, 2023 If you want to use the group by, then you should probably do the count where the group by is being done, and use distinct by as you had it. select distinct by(serial,hq) hq, count(1)from thetablegroup by hq If you want it per that grouping. There are no filters in it, so it is going to do a full table scan and compare and calculate values for each row. Taking the amount of time it takes, it is actually fast. Maybe look into Bitslice indexes. It might help but at a cost of performance on insert and update:InterSystems Documentation