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

os/filestore: fix merge_collection replay guards #24806

Merged
merged 1 commit into from Nov 9, 2018

Conversation

liewegas
Copy link
Member

The guards are based on spos, which does not change across the call to
_merge_collection, which means we can't open and close multiple guards
within this call. Instead, use a single set of set_guards and closes
surrounding both the collection and temp.

Also, remove the conditional guard around _remove_collection, which we
want to (try to) do (again) as long as we didn't complete our global
replay guard.

Fixes: http://tracker.ceph.com/issues/36610
Signed-off-by: Sage Weil sage@redhat.com

Copy link
Member

@jdurgin jdurgin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all these steps should be idempotent, so replaying both temp and main collection merges and the source removal if we replay at all looks right.

@yuriw
Copy link
Contributor

yuriw commented Oct 30, 2018

@liewegas
Copy link
Member Author

liewegas commented Nov 5, 2018

/a/sage-2018-11-05_14:43:15-rados-wip-sage3-testing-2018-11-04-2008-distro-basic-smithi/3226718

 -2162> 2018-11-05 15:41:20.933 7fb40c4d5700 10 filestore(/var/lib/ceph/osd/ceph-3) _destroy_collection(5474): /var/lib/ceph/osd/ceph-3/current/1.24_TEMP = 0
 -2161> 2018-11-05 15:41:20.933 7fb40c4d5700 10 filestore(/var/lib/ceph/osd/ceph-3) _destroy_collection(5474): /var/lib/ceph/osd/ceph-3/current/1.24_head = 0
 -2152> 2018-11-05 15:41:20.933 7fb40c4d5700 -1 filestore(/var/lib/ceph/osd/ceph-3) _close_replay_guard(2608): 1.24_TEMP error (2) No such file or directory
  -938> 2018-11-05 15:41:20.936 7fb40c4d5700 -1 /home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos7/DIST/centos7/MACHINE_SIZE/huge/release/14.0.0-4796-gfdd4a33/rpm/el7/BUILD/ceph-14.0.0-4796-gfdd4a33/src/os/filestore/FileStore.cc: In function 'void FileStore::_close_replay_guard(const coll_t&, const SequencerPosition&)' thread 7fb40c4d5700 time 2018-11-05 15:41:20.933853

The guards are based on spos, which does not change across the call to
_merge_collection, which means we can't open and close multiple guards
within this call.  Instead, use a single set of set_guards and closes
surrounding both the collection and temp.

Also, remove the conditional guard around _remove_collection, which we
want to (try to) do (again) as long as we didn't complete our global
replay guard.

Fixes: http://tracker.ceph.com/issues/36610
Signed-off-by: Sage Weil <sage@redhat.com>
@liewegas liewegas merged commit fd2e1f3 into ceph:master Nov 9, 2018
liewegas added a commit that referenced this pull request Nov 9, 2018
* refs/pull/24806/head:
	os/filestore: fix merge_collection replay guards

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants