-
Notifications
You must be signed in to change notification settings - Fork 467
refactor fates storage layer #4017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor fates storage layer #4017
Conversation
Refactored the storage layer of FATE to return an object when reserving a fate transaction. This object allows mutating the storage related to that FATE transaction. This replaces methods where the fate transaction id had to to always be passed. These changes are a subset of the changes in apache#3964, but only focusing on the storage layer refactoring and nothing else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The overall structure of the changes look good to me but I tried running the FateIT test and it is failing for me for multiple of the tests so something doesn't seem quite right.
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.accumulo.test.fate.zookeeper.FateIT
[ERROR] Tests run: 4, Failures: 1, Errors: 1, Skipped: 0, Time elapsed: 20.61 s <<< FAILURE! -- in org.apache.accumulo.test.fate.zookeeper.FateIT
[ERROR] org.apache.accumulo.test.fate.zookeeper.FateIT.testCancelWhileSubmittedAndRunning -- Time elapsed: 3.695 s <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: <false> but was: <true>
at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
at org.junit.jupiter.api.AssertFalse.failNotFalse(AssertFalse.java:63)
at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:36)
at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:31)
at org.junit.jupiter.api.Assertions.assertFalse(Assertions.java:228)
at org.apache.accumulo.test.fate.zookeeper.FateIT.testCancelWhileSubmittedAndRunning(FateIT.java:279)
...
[ERROR] org.apache.accumulo.test.fate.zookeeper.FateIT.testCancelWhileNew -- Time elapsed: 3.038 s <<< ERROR!
java.lang.IllegalStateException: Can not delete in progress transaction FATE[389879b65476f988]
at org.apache.accumulo.core.fate.Fate.delete(Fate.java:356)
at org.apache.accumulo.test.fate.zookeeper.FateIT.testCancelWhileNew(FateIT.java:241)
...
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] FateIT.testCancelWhileSubmittedAndRunning:279 expected: <false> but was: <true>
[ERROR] Errors:
[ERROR] FateIT.testCancelWhileNew:241 » IllegalState Can not delete in progress transaction FATE[389879b65476f988]
[INFO]
[ERROR] Tests run: 4, Failures: 1, Errors: 1, Skipped: 0
@keith-turner - The test failures appear to be race condition related. I took a shot at fixing the tests and pushed a commit up that fixes it. Feel free to revert it or change it if you think it isn't correct of course. After my commit:
|
Those changes look good. Thanks for the fix. Thinking that is a pre-existing bug in the test, may be worthwhile back-porting just the test changes. |
This change modifies FATE to use singe thread to find work. It also cleans up some of the signaling between threads in FATE and fixes a synchronization bug in FATE that was introduced in apache#4017. The bug introduced in apache#4017 is that somethings are syncronizing on the wrong object because a new inner class was introduced.
This change modifies FATE to use singe thread to find work. It also cleans up some of the signaling between threads in FATE and fixes a synchronization bug in FATE that was introduced in apache#4017. The bug introduced in apache#4017 is that somethings are syncronizing on the wrong object because a new inner class was introduced. These changes were pulled from apache#3964 and cleaned up and improved.
This change modifies FATE to use singe thread to find work. It also cleans up some of the signaling between threads in FATE and fixes a synchronization bug in FATE that was introduced in #4017. The bug introduced in #4017 is that somethings are syncronizing on the wrong object because a new inner class was introduced. These changes were pulled from #3964 and cleaned up and improved.
Refactored the storage layer of FATE to return an object when reserving a fate transaction. This object allows mutating the storage related to that FATE transaction. This replaces methods where the fate transaction id had to to always be passed.
These changes are a subset of the changes in #3964, but only focusing on the storage layer refactoring and nothing else.