Repository navigation
crimson/os/seastore: add unittests for transaction manager's clone/remap/read_pin and fix bugs - #54036
Conversation
|
This is the follow up PR for #51141 |
|
jenkins test make check |
cyx1231st
left a comment
There was a problem hiding this comment.
Irrelavent to this PR but relavent to the clone feature:
IIUC the public interfaces inc/dec_ref() are not appropriate semantic for TM users.
With the clone design, I think the more appropriate TM-level interface would be remove(t, laddr), remove(t, lextent) and/or remove(t, pin), which is only allowed to remove indirect mapping or the direct mapping with refcount==1.
What do you think?
There was a problem hiding this comment.
I need to make sure whether this is a valid use case from ObjectStore perspective -- data overwrite and clone happening in the same transaction.
If yes, how about the nested case e.g. remap-clone-remap-... in the same transaction? And things are more complicated with the delta-base overwrite support (see #50419 @myoungwon ), we will need to consider to test interleaving that with clone&remap in various ways.
If no, things will be simpler to assert that the cloned extent must be stable. And I think the more important test would be to interleave various clone operations as independent transactions into test_random_writes_concurrent().
@athanatos what's your insight?
There was a problem hiding this comment.
Hmm. When the osd gets a write on an object with an outstanding snapshot, the transaction will contain a clone followed by the mutation. I can't think of a case where you'd see the other order (a mutation followed by a clone).
There was a problem hiding this comment.
Looks this is testing clone-then-remap in the same transaction.
Probable we can also assert that the cloning extent is stable to detect whether the scenario is expected ?
There was a problem hiding this comment.
Probable we can also assert that the cloning extent is stable to detect whether the scenario is expected ?
Actually, CLONE only operates on lba mappings and doesn't see those extents being cloned.
There was a problem hiding this comment.
And I think the more important test would be to interleave various clone operations as independent transactions into
test_random_writes_concurrent().
test_random_writes_concurrent() modify TestBlocks through extents' mutate interface, which the current ObjectDataBlock and CLONE don't support. Maybe we can implement these in follow-up PRs.
There was a problem hiding this comment.
Actually, CLONE only operates on lba mappings and doesn't see those extents being cloned.
CLONE will always query the direct mapping which will get access to the cached extent if present in cache, so a check that the cloned extent should not be pending is possible, right?
There was a problem hiding this comment.
test_random_writes_concurrent() modify TestBlocks through extents' mutate interface, which the current ObjectDataBlock and CLONE don't support. Maybe we can implement these in follow-up PRs.
Not sure how TestBlock's mutate interface is related here as we will only test to clone "stable" extents for now. But it should be good to implement in another PR.
19c737c to
2af237b
Compare
|
Regarding delta-base overwrite support with cloned extent, for now, I think we should prevent the extent from being overwritten by a delta base operation if the extent has been cloned because it'll overwrite the existing physical extent. To support delta-base overwrite support with cloned extent, the clone operation probably needs to make a complete extent copy if delta-base overwrite is enabled. But, this might be expensive. |
|
After discussing with @xxhdx1985126, the conclusion is that we don't need another |
Agreed, we can prevent delta-based overwrite to the cloned extents for now.
Anyway, we can always fall back to the remap-based overwrite approach which is already implemented. |
2af237b to
1b26be0
Compare
|
@cyx1231st All done, please take a look again:-) |
1b26be0 to
056defc
Compare
8d7c83a to
0264cfe
Compare
Signed-off-by: Xuehan Xu <[email protected]>
dupicating lba mappings Signed-off-by: Xuehan Xu <[email protected]>
Signed-off-by: Xuehan Xu <[email protected]>
0264cfe to
f9b1091
Compare
f9b1091 to
8c42bcd
Compare
always have the entire original mappings as their targets Signed-off-by: Xuehan Xu <[email protected]>
Signed-off-by: Xuehan Xu <[email protected]>
cyx1231st
left a comment
There was a problem hiding this comment.
LGTM, looks #54036 (comment) isn't addressed yet.
8c42bcd to
08c751c
Compare
Done:-) |
|
I'll merge if there are no further comments. @myoungwon @athanatos Looks to me the critical impact is about refining I'll add a follow-up PR around #54036 (comment) |
from users of TransactionManager Signed-off-by: Xuehan Xu <[email protected]>
Signed-off-by: Xuehan Xu <[email protected]>
08c751c to
4010045
Compare
| using ref_iertr = LBAManager::ref_iertr; | ||
| using ref_ret = ref_iertr::future<unsigned>; | ||
|
|
||
| #ifdef UNIT_TESTS_BUILT |
There was a problem hiding this comment.
Looks it is missing in transaction_manager.cc which breaks the non-test build.
Signed-off-by: Xuehan Xu [email protected]
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows