osd: handle no-op write with snapshot case
If we have a transaction that does something to the object but it !exists
both before and after, we will continue through the write path. If the
snapdir object already exists, and we try to create it again, we will
leak a snapdir obc.
Fix is to not recreate the snapdir if it already exists.
Fixes: #10262
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Loic Dachary <ldachary@redhat.com>
(cherry picked from commit
02fae9fc54c10b5a932102bac43f32199d4cb612)
Conflicts:
src/osd/ReplicatedPG.cc
src/test/librados/snapshots.cc