Inconsistent AtSync behavior with bound arrays
Reported by Jozsef from Quinoa:
He is using AtSync migration to balance multiple bound arrays. He only calls AtSync from one of the arrays. He saw behavior differences when using ResumeFromSync vs not.
When not waiting on ResumeFromSync(), if all bound array elements set usesAtSync=true, then everything worked fine (even though only one array called AtSync). If only the main array set usesAtSync=true, then there would be hangs/segfaults.
When waiting on ResumeFromSync(), he saw the opposite. Everything worked correctly if only the main array set usesAtSync=true, but hung/segfaulted if they all set it.
To my understanding, if only one of the bound arrays is calling AtSync, it should be the only one that sets usesAtSync=true, regardless of whether ResumeFromSync() is used.
He has a small test case and he is going to see if it also exhibits this problem for us.
#2 Updated by Eric Mikida 4 months ago
- Status changed from New to Closed
This was an issue with the application itself. There was inconsistent usage of usesAtSync / ResumeFromSync. The main issue was that the runtime only uses a counter to determine when an AtSync occurs. So if one array calls AtSync multiple times its elements will be counted multiple times towards AtSync, and may trigger it even if the other array never calls AtSync. It is on the application to coordinate its AtSync calls, which is usually only an issue when not blocking for ResumeFromSync.