]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: do not do a redundant set of ctx->new_obs.oi.version
authorGreg Farnum <greg@inktank.com>
Thu, 22 Aug 2013 21:54:19 +0000 (14:54 -0700)
committerGreg Farnum <greg@inktank.com>
Wed, 28 Aug 2013 00:00:44 +0000 (17:00 -0700)
We set this in the if below for writes, and for reads it doesn't need to
be updated (and isn't). Remove the confusing double-set so future code
inspectors don't get concerned there's a bug like I did.

Signed-off-by: Greg Farnum <greg@inktank.com>
src/osd/ReplicatedPG.cc

index 516ac745edcfeb1b297da21366323fdf2e3f1a3e..dc2ef949731592fce64b19affa1fc58d6c75e503 100644 (file)
@@ -3853,7 +3853,6 @@ int ReplicatedPG::prepare_transaction(OpContext *ctx)
   }
   ctx->reply_version = ctx->new_obs.oi.user_version;
   ctx->bytes_written = ctx->op_t.get_encoded_bytes();
-  ctx->new_obs.oi.version = ctx->at_version;
  
   if (ctx->new_obs.exists) {
     // on the head object