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

Avoid occasional "runner has been closed" error during indexing #2927

Open
jjezra opened this issue Sep 24, 2024 · 0 comments
Open

Avoid occasional "runner has been closed" error during indexing #2927

jjezra opened this issue Sep 24, 2024 · 0 comments

Comments

@jjezra
Copy link
Contributor

jjezra commented Sep 24, 2024

As it seems:
Synchronized runner is created by runner.startSynchronizedSessionAsync, while the calling runner sets itself as the underlying runner (which is the main runner for the indexing session).
Let it be mainRunner and SyncRunner (where the latest points to `mainRunner).
runWithSynchronizedRunnerAndEndSession is called with the syncRunner, saves it in indexingCommon, the uses MoreAsyncUtil.composeWhenComplete to wait for the code to finish, then remove the syncRunner from indexingCommon.
When the indexer is closed, mainRunner is closed and if a syncRunner is not null, it closes too.
Typically the indexer is closed only after MoreAsyncUtil.composeWhenComplete gets to clear the syncRunner from common. But sometimes (seen it in exception path), the indexer is closed first and then:
Closes mainRunner
Closes syncRunner, which attempts to close the underlying runner, which is the mainRunner that cannot be re-closed.

jjezra added a commit to jjezra/fdb-record-layer that referenced this issue Sep 24, 2024
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

No branches or pull requests

1 participant