]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: add processed_subop_count for cls_cxx_subop_version()
authorCasey Bodley <cbodley@redhat.com>
Sat, 28 Oct 2017 20:28:27 +0000 (16:28 -0400)
committerShinobu Kinjo <shinobu@redhat.com>
Fri, 3 Nov 2017 22:34:23 +0000 (07:34 +0900)
commit9f09b1bb1f032d626992fa9b63ac613ee0969f3d
tree297ddd74470fd4bb93c42ab99c8cbf4dd71dc3f0
parent1b00bdfeefd7b724f14634383ae4baaf7a42c996
osd: add processed_subop_count for cls_cxx_subop_version()

cls_log_add() relies on cls_cxx_subop_version() to generate unique keys
for log entries with the same timestamp. because cls calls back into
do_osd_ops(), resetting current_osd_subop_num means that cls_log_add()
will keep seeing the same subop version and generating the same keys.
this causes the following failure in ceph_test_cls_log:

[ RUN      ] cls_rgw.test_log_add_same_time
/home/cbodley/ceph/src/test/cls_log/test_cls_log.cc:144: Failure
      Expected: 10
To be equal to: (int)entries.size()
      Which is: 1
[  FAILED  ] cls_rgw.test_log_add_same_time (1180 ms)

Fixes: http://tracker.ceph.com/issues/21964
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 95faac9ae2cd38b1ca25c90f90bd4a53fe6af4d4)
src/objclass/class_api.cc
src/osd/PrimaryLogPG.cc
src/osd/PrimaryLogPG.h