]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/OSD: choose a fixed thread do oncommits callback function 22739/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Thu, 20 Sep 2018 14:10:20 +0000 (22:10 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Thu, 20 Sep 2018 14:10:20 +0000 (22:10 +0800)
commit6c583fe756c82ed6c196caa0ce783765d5e9ee41
treecc1f52c0dc11c3676e26cacada636cdc97ce2bd6
parent754f3aa44519029df6ce3b6a68e12b69171dbf14
osd/OSD: choose a fixed thread do oncommits callback function

Now bluestore oncommit callback exec by osd op threads.
If there are multi threads of shard, it will cause out-of order.
For example, threads_per_shard=2
              Thread1                                 Thread2
    swap_oncommits(op1_oncommit)
                                            swap_oncommits(op2_oncommit)
    OpQueueItem.run(Op3)
                                            op2_oncommit.complete();
    op1_oncommit.complete()

This make oncommits out of order.
To avoiding this, we choose a fixed thread which has the smallest
thread_index of shard to do oncommit callback function.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/common/Finisher.h
src/osd/OSD.cc
src/osd/OSD.h