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

Acquire index writer lock before renaming translog file #11396

Merged
merged 1 commit into from May 28, 2015

Conversation

s1monw
Copy link
Contributor

@s1monw s1monw commented May 28, 2015

in 1.x we still rename the translog file before recovery. Yet,
essentially the translog is guarded by the IW lock but we perform
these operations before we start the engine. This can cause trouble
in the shared FS case where we do full restarts and the lock owning
node has already dropped off the cluster (another taking over the primary)
but has not yet flushed it's translog. If we wait for the IW lock we guarantee
that the translog has been flushed.
This fixes CI failures like http://build-us-00.elastic.co/job/es_g1gc_1x_metal/9894/

in 1.x we still rename the translog file before recovery. Yet,
essentially the translog is guarded by the IW lock but we perform
these operations before we start the engine. This can cause trouble
in the shared FS case where we do full restarts and the lock owning
node has already dropped off the cluster (another taking over the primary)
but has not yet flushed it's translog. If we wait for the IW lock we guarantee
that the translog has been flushed.
This fixes CI failures like  http://build-us-00.elastic.co/job/es_g1gc_1x_metal/9894/
@dakrone
Copy link
Member

dakrone commented May 28, 2015

LGTM

@s1monw s1monw merged commit ca0b40b into elastic:1.x May 28, 2015
@s1monw s1monw deleted the aqcuire_write_lock_on_translog_move branch May 28, 2015 15:16
@clintongormley clintongormley changed the title Acquire index writer lock before renaming trasnlog file Acquire index writer lock before renaming translog file May 28, 2015
@clintongormley clintongormley added :Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. :Distributed/Engine Anything around managing Lucene and the Translog in an open shard. and removed :Translog :Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. labels Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed/Engine Anything around managing Lucene and the Translog in an open shard. v1.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants