Skip to content

rgw multisite: add bucket log generation to datalog entries#39396

Merged
cbodley merged 8 commits intoceph:wip-rgw-multisite-reshardfrom
cbodley:wip-rgw-38561-rebased
Feb 11, 2021
Merged

rgw multisite: add bucket log generation to datalog entries#39396
cbodley merged 8 commits intoceph:wip-rgw-multisite-reshardfrom
cbodley:wip-rgw-38561-rebased

Conversation

@cbodley
Copy link
Contributor

@cbodley cbodley commented Feb 10, 2021

rebased version of #38561 with additional fixes

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

adamemerson and others added 4 commits February 9, 2021 17:11
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>

void encode(ceph::buffer::list& bl) const {
ENCODE_START(1, 1, bl);
ENCODE_START(2, 2, bl);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For rolling upgrades, we should change this so it sends the 1,1 version (that doesn't know about gen ids and can be decoded by old versions) when we're in generation zero. That way we only break compatibility when we reshard.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if an upgraded radosgw encodes this with v2, a non-upgraded radosgw will still be able to decode it as v1 because the compat version allows it. the DECODE_FINISH() macro will just skip past the unrecognized bytes at the end

conversely, it could be helpful to raise an error in the case where a datalog entry with gen>0 would be misinterpreted by older clients. how about this?

const uint8_t compat = (gen == 0) ? 1 : 2; // require decoders to recognize v2 when gen>0
ENCODE_START(2, compat, bl);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds fine to me!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we only try to decode these entries in RGWDataChangesBE::list(), so an error there would effectively prevent old radosgws from serving those entries to other zones in RGWOp_DATALog_List

cbodley and others added 4 commits February 10, 2021 11:21
but if gen>0, require decoders to understand the v2 format. this way,
old clients can't decode entries with gen>0, so they won't be able to
serve them to other zones

Signed-off-by: Casey Bodley <cbodley@redhat.com>
Drop entries from past generations.

Send entries of future generations to the error repo for retry.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
wait until we've read the bucket sync status and found that we're in
incremental sync before we start using incremental_gen for comparison

Signed-off-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants