Because any thread might grab mds_lock and call heartbeat_reset
immediately after a call to suicide() completes, this needs
to be handled as a special case where we tolerate MDS::hb having
already been destroyed.
Fixes: #10382
Signed-off-by: John Spray <john.spray@redhat.com>
We were iterating on both completion_objs, and completions assuming that
they follow each other. They don't do it. While at it, index completions
by id, so that we could update the completed objs correctly.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Fixes: #10311
We're keeping track of rados objects that we've written so that we could
clean them up if needed. Earlier we weren't too accurate about it and
were also setting the head object that is yet to be written. This now
only applies to the tail data, and a bit clearer.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
The zone config params are set in the region configuration. Also,
there's a ceph.conf configurable (rgw_override_bucket_index_max_shards)
for overriding this per rgw.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Need to pass the actual num shards that are going to be used for this
specific bucket. Bucket may be created by applying metadata from
different zone, so num shards might be different.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Instead of just having the list of oids, keep the shard ids together, so
that we can know on which shard the operation happened.
Bucket markers are just using the shard numeric id, instead of the
bucket instance shard id. This makes it easier to parse the markers
appropriately.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Class is no longer a template, and keeps a map of oids by shard_id. Call
issue_op() using both shard_id and oids. Shard id is used for mapping
the results in the derived classes.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Instead of recalculating the hash every call, do it once, and pass this
structure around. Also, will be used for logging changes into the data
log.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
bucket shard can be specified on the bucket instance param. It can be
added like this: <bucket-instance>[:shard-id]
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Turned the ConcurrentIO class a template, so that we could use different
kind of containers that are needed for the different operations.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Instead of copy pasting the same code all over again, create a base
class for the needed concurrent IO operations.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Previous we would queue lots of distinct encoded Transactions from various
callers, usually one per PaxosService. These would be sent through paxos
one at a time.
If there is a completed transaction there is no reason to delay; it is
more efficient to push it through immediately. Since we will propose
anything pending right when we finish, there is minimal opportunity for
other work to get done.
Instead, accumulate everything in a single MonitorDBStore::Transaction and
propose all pending changes all at once. Encode at propose time and
expose the Transaction to the callers so they can add their changes.
Signed-off-by: Sage Weil <sage@redhat.com>