]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
crimson/osd/../client_request: add note to can_serve_replica_read 62535/head
authorMatan Breizman <mbreizma@redhat.com>
Wed, 2 Apr 2025 09:30:45 +0000 (09:30 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Wed, 2 Apr 2025 10:28:53 +0000 (10:28 +0000)
commit480b7c6e19d9061fa279a0255eaab3a532101f42
treed0bcb8fb016b62dcf572981b97d42ec47eb4fc60
parent5744613a4a4f107a59f1de6e2a35acc177b1eb28
crimson/osd/../client_request: add note to can_serve_replica_read

can_serve_replica_read uses PGLog::has_write_since, when checking for
writes we actually check if any pglog entry belongs to the head object.

The only two pglog entries that are of a clone object are:
1) At creation (pg_log_entry_t::CLONE)
2) At trimming (See remove_or_update)

In both cases, the there would be another pg log entry of the head.

---

Add assertion in prepare_head_update to assert that the above is true.
The obc passed to prepare_head_update (by OpsExecuter) could also be
a clone object (after being resolved). However, write operations should
only occur to head - so let's verify that.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/crimson/osd/ops_executer.cc
src/crimson/osd/osd_operations/client_request.cc