Add a counter to memcach so that we can detect data change#316
Merged
hugtalbot merged 1 commit intosofa-framework:masterfrom Dec 7, 2022
Merged
Add a counter to memcach so that we can detect data change#316hugtalbot merged 1 commit intosofa-framework:masterfrom
hugtalbot merged 1 commit intosofa-framework:masterfrom
Conversation
Contributor
|
CI restarted |
c56a2be to
1ee1c8b
Compare
Contributor
|
Fix needed when we use the cache of SOFA data loaded into python. The unit test had an issue but not emitting a proper test error. A benchmark comparing the use and no use of this cache in term of performance would be really nice. |
Contributor
|
Hello @ScheiklP , this PR should fix the problem you had on the size of the vector position before/after adding points. |
Collaborator
|
Hi @epernod, Thanks a lot! :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The issue 313 shows that the memcache is not updated when the data have changed but the flag is not anymore dirty. This happens when between the change and the call to the writeable() function somewhere else in Sofa, a component/controller/the gui had called the updateIfDirty() method.
In order to detect the "no more dirty but changed data" a counter is added to the memcache enties so we can detect if it is different from the counter stored in the BaseData.
fix issue #313
The PR also restore all the tests in Base.py that are failing silently since a long time (the fact that parse error in python tests can get un-noticed is very problematic, we should fix that one day.).