Is there any known issue where flow.set is inconsistently failing? I have run into this three times now, where an existing working flow that does flow.set (write to file system, i.e. persistent) seems to fail to write out changes to the object before the flow.set invoked.
I can't consistently cause the behavior explicitly over and over, but once it happens, it keeps happening for the given flow. Stopping and restarted NR does not fix the issue, deleting the context object and creating it does not seem to fix the odd behavior.
As far as I can tell there is no errors or exceptions reported anywhere that might provide clue how or when this happens. I am going to export the flow in question, and re-image the SD card and/or use a different SD card. But I would think any writes to SD card that fail would be visible in the NR logging right?
What is odd is the issue happen only to a specific attribute of an object, that is written flow flow set. For example, where 'persistent' the name I set in settings.js for localfilesystem context variables, versus memory only.
obj = flow.get('object', 'persistent')
Where obj is...
obj = {
a:1,
b:2
}
Change one attribute/property...
obj.b=4
flow.set('object', obj, 'persistent')
obj2=flow.get('object', 'persistent')
Where obj2 should be...
obj2 = {
a:1,
b:4
}
But when I look at the object...
obj2 = {
a:1,
b:2
}
Why is b not equal to 4? Given this is in a functional node... not an explicit deep copy (that I know of). I can change any other property in the object and it is correct after each change, but the b property seems to locked or stuck at value 2, and never changes to value 4, once this odd behavior starts... it can be minutes, hours, even days, until the behavior happens... but once it happens, it is consistent. It is almost like b = 2 becomes read only?
This to me implies some type of write failure on the SD card, but a write error specific to a specific attribute or property of an given object? Is that even reasonable? Or is something else going on?
Is there a way to explicit test for context write issue in NR? Some enhanced logging I can turn on, to catch this?