From: Kefu Chai Date: Mon, 22 Feb 2021 11:36:54 +0000 (+0800) Subject: crimson/common: let the first id to be 1 X-Git-Tag: v17.1.0~2840^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2483a486b85621cb7a1ef19eeeac4dec7d997deb;p=ceph.git crimson/common: let the first id to be 1 it'd be simpler if we can use 0 as a sentry for sequencer. 0 would be id of the last completed operation. Signed-off-by: Kefu Chai --- diff --git a/src/crimson/common/operation.h b/src/crimson/common/operation.h index 1dbc635f78e5..e086bf95a374 100644 --- a/src/crimson/common/operation.h +++ b/src/crimson/common/operation.h @@ -265,7 +265,7 @@ class OperationRegistryT : public OperationRegistryI { protected: void do_register(Operation *op) final { registries[op->get_type()].push_back(*op); - op->set_id(op_id_counters[op->get_type()]++); + op->set_id(++op_id_counters[op->get_type()]); } bool registries_empty() const final {