Skip to content
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

when Close or Recovery Indexer, it's need to reset the Offset #62

Closed
wants to merge 1 commit into from

Conversation

scottzzq
Copy link

when Close or Recovery Indexer, it's need to reset the Index.Offset

@Terry-Mao
Copy link
Owner

Indexer&Block Close&Open used for Flush inner buffer and close inner goroutine handler, so all struct status MUST keep.

sth like:

NewIndexer
NewBlock

try to recovery block & index, then start all handler goroutine.

Close called by a empty Volume , free Volume ,they wait for add a new volume.

so offset may has it's status.

@Terry-Mao
Copy link
Owner

NewIndexer -> Recovery -> Close -> [wait for new a volume] -> Open

After Recovery, Offset must keep for Open

@Terry-Mao Terry-Mao closed this Oct 18, 2016
@scottzzq
Copy link
Author

When running the index_test.go, the process is:
NewIndexer
Add
Close
Recovery
Add
Because the Recocery process will add the Offset again, the Offset will be wrong.
So, I think, in the Recovery code, Offset should be reset 0.

@Terry-Mao
Copy link
Owner

okay, i'll fix the go test, it's confused

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

Successfully merging this pull request may close these issues.

2 participants