-
Notifications
You must be signed in to change notification settings - Fork 650
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
fix rollback panic bug #153
Conversation
ref #152 |
Since I don't see the code testing the |
@WIZARD-CXY Is there a less expensive way to rollback the tx? Can we simply put back the allocated pages for the write tx when rolling back? |
@xiang90 yeah, I have the same concern. Now freelist |
If we want to keep the exact same behavior as the |
Actually, I tried to remove the |
@benbjohnson why we call freelist's |
@xiang90 @yudai @gyuho @hexfusion ptal |
kindly ping @xiang90 @yudai @gyuho @hexfusion |
c6aecba
to
64f0ae0
Compare
@@ -349,6 +349,28 @@ func (f *freelist) reload(p *page) { | |||
f.readIDs(a) | |||
} | |||
|
|||
// noSyncReload reads the freelist from pgids and filters out pending items. | |||
func (f *freelist) noSyncReload(pgids []pgid) { |
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.
freelist knows its own type. we can do the branch inside the reload func.
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 type of freelist is hashmap or array. It is irrelevant with sync or not-sync.
just two styling issue. |
I did a release here https://github.com/etcd-io/bbolt/releases/tag/v1.3.3. can you update the dependency of bbolt in etcd to include the fix? |
@xiang90 consider it done |
this brings the dependency back to a released version: - go.etcd.io/bbolt etcd-io/bbolt@2eb7227...v1.3.3 - etcd-io/bbolt#153 fix rollback panic bug - fixes etcd-io/bbolt#152 Panic (index out of range) on writeable tx rollback with db.NoFreelistSync Signed-off-by: Sebastiaan van Stijn <[email protected]>
this brings the dependency back to a released version: - go.etcd.io/bbolt etcd-io/bbolt@2eb7227...v1.3.3 - etcd-io/bbolt#153 fix rollback panic bug - fixes etcd-io/bbolt#152 Panic (index out of range) on writeable tx rollback with db.NoFreelistSync Signed-off-by: Sebastiaan van Stijn <[email protected]>
fix the panic bug in freelist
rollback
function and add test.