-
Notifications
You must be signed in to change notification settings - Fork 449
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
Single node META FATE data #5127
Conversation
- Moved all the fate data for a `META` transaction into a single ZK node - Pushed all the data into `NodeValue` (renamed to `FateData`) - Previously, `FateData` stored `TStatus`, `FateReservation`, and `FateKey`. Now additionally stores the `REPO` stack and `TxInfo`. - Status enforcement added to `MetaFateStore` (previously only possible for `UserFateStore`). - Moved `testFateInitialConfigCorrectness()` from `UserFateStoreIT` to `UserFateIT` - Renamed `UserFateStoreIT` to `UserFateStatusEnforcementIT` (now extends a new class `FateStatusEnforcementIT`) - Now only tests status enforcement (previously status enforcement + `testFateInitialConfigCorrectness()`) - Created `MetaFateStatusEnforcementIT` (extends `FateStatusEnforcementIT`) - Tests that the new status enforcement in `MetaFateStore` works - Created `FateStoreUtil`, moving the `createFateTable()` util here, created MetaFateZKSetup inner class here (the counterpart to `createFateTable()` for `UserFateStore` but sets up ZooKeeper for use in `MetaFateStore`) - Deleted `UserFateStoreIT`s (now `UserFateStatusEnforcementIT`) method `injectStatus` replacing with the existing `setStatus` which does the same thing
test/src/main/java/org/apache/accumulo/test/fate/meta/MetaMultipleStoresIT.java
Show resolved
Hide resolved
test/src/main/java/org/apache/accumulo/test/fate/FateStatusEnforcementIT.java
Show resolved
Hide resolved
test/src/main/java/org/apache/accumulo/test/fate/user/UserFateStoreIT.java
Show resolved
Hide resolved
core/src/main/java/org/apache/accumulo/core/fate/zookeeper/MetaFateStore.java
Show resolved
Hide resolved
core/src/main/java/org/apache/accumulo/core/fate/zookeeper/MetaFateStore.java
Show resolved
Hide resolved
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.
These changes look good. The test cleanup and reorg is nice. The only possible problem I saw was the repo ser/deser. Wondering if the !
char could occur in serialized data. Would be nice to avoid that.
core/src/main/java/org/apache/accumulo/core/fate/zookeeper/MetaFateStore.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/accumulo/core/fate/zookeeper/MetaFateStore.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/accumulo/core/fate/zookeeper/MetaFateStore.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/accumulo/core/fate/zookeeper/MetaFateStore.java
Outdated
Show resolved
Hide resolved
test/src/main/java/org/apache/accumulo/test/fate/meta/MetaMultipleStoresIT.java
Show resolved
Hide resolved
test/src/main/java/org/apache/accumulo/test/fate/FateStatusEnforcementIT.java
Show resolved
Hide resolved
core/src/main/java/org/apache/accumulo/core/fate/zookeeper/MetaFateStore.java
Show resolved
Hide resolved
- Got rid of END_REPO_DATA marker, replacing with simply writing the number of repos to read - Avoid AtomicBoolean in `MetaFateStore.FateTxStoreImpl.push(repo)` by changing StackOverflowException to instead be a RuntimeException (previously Exception) - Deleted unnecessary preexisting catch and immediate re-throw of a StackOverflowException in `MetaFateStore.FateTxStoreImpl.push(repo)` - Cleaned up and refactored `MetaFateStore` methods which mutate existing FateData; now reuse same pattern across these methods: all call new method `MetaFateStore.mutate()`
Addressed in 29edaa2:
|
core/src/main/java/org/apache/accumulo/core/fate/zookeeper/MetaFateStore.java
Show resolved
Hide resolved
Resolved the conflicts from the recent seed transaction speedup. Thankfully, those changes were mostly for UserFateStore and these are for MetaFateStore, so conflicts were very easy |
closes #4905
META
transaction into a single ZK nodeNodeValue
(renamed toFateData
)FateData
storedTStatus
,FateReservation
, andFateKey
. Now additionally stores theREPO
stack andTxInfo
.MetaFateStore
(previously only possible forUserFateStore
).testFateInitialConfigCorrectness()
fromUserFateStoreIT
toUserFateIT
UserFateStoreIT
toUserFateStatusEnforcementIT
(now extends a new classFateStatusEnforcementIT
)testFateInitialConfigCorrectness()
)MetaFateStatusEnforcementIT
(extendsFateStatusEnforcementIT
)MetaFateStore
worksFateStoreUtil
, moving thecreateFateTable()
util here, created MetaFateZKSetup inner class here (the counterpart tocreateFateTable()
forUserFateStore
but sets up ZooKeeper for use inMetaFateStore
)UserFateStoreIT
s (nowUserFateStatusEnforcementIT
) methodinjectStatus
replacing with the existingsetStatus
which does the same thingI did not end up using JSON for the fate data. I was not sure what the benefit of this would be since the data needs to be stored in ZK as a byte array anyways and it seemed simpler to me to just keep the same serialization/deserialization strategy for the fate data. Maybe this could be changed to JSON in a follow on if there would be a benefit of using JSON over the current strategy.