Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

bug of shared log's size calculation #133

Closed
shengofsun opened this issue Jul 16, 2018 · 1 comment · Fixed by #135
Closed

bug of shared log's size calculation #133

shengofsun opened this issue Jul 16, 2018 · 1 comment · Fixed by #135

Comments

@shengofsun
Copy link
Contributor

shengofsun commented Jul 16, 2018

The shared log's size is calculated by "global_end_offset - global_start_offset". When all shared log are deleted, the "global_start_offset" will be reset to 0, while the "global_end_offset" will remain unchanged, in which case we will get a uncorrect "size" of shared log.

please see

_global_start_offset =
for details.

Setting "_global_start_offset" to "_global_end_offset" may fix this, but we need to test it.

@qinzuoyan
Copy link
Member

I think we can resolve this bug by simply check _log_files.size() > 0, as in #135

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants