-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Modify partition's version name to what it means #334
Conversation
morningman
commented
Nov 21, 2018
- committedVersion(Hash) -> visibleVersion(Hash)
- currentVersion(Hash) -> committedVersion(Hash)
- add some comment to make the code more readable.
- fix a ut bug that editlog may be null in CatalogIdGenerator.
1. committedVersion(Hash) -> visibleVersion(Hash) 2. currentVersion(Hash) -> committedVersion(Hash) 3. add some comment to make the code more readable
To avoid unit test failure
if (allBackends == null || allBackends.size() == 0) { | ||
LOG.warn("some transaction state need to publish, but no alive backends!!!"); | ||
if (allBackends.isEmpty()) { | ||
LOG.warn("some transaction state need to publish, but no backend exists"); | ||
return; |
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.
if allbackends == null ,then nptr throws
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.
allbackends never returns null
@@ -448,35 +454,40 @@ public void abortTransaction(Long dbId, String label, String reason) throws User | |||
continue; | |||
} | |||
db.readLock(); | |||
writeLock(); | |||
try { |
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.
why not use write lock
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.
There is no changing here, so read lock is enough.
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.
LGTM