-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
105839: kvserver,storage: Update snapshot strategy to use shared storage r=sumeerbhola a=itsbilal If the sender node was created with a SharedStorage, switch to fast ingestion where we ScanInternal() the keys not in shared levels, and just share the metadata for files in shared levels. The sender of the snapshot specifies in the Header that it is using this ability, and the receiver rejects the snapshot if it cannot accept shared snapshots. If ScanInternal() returns an `ErrInvalidSkipSharedIteration`, we switch back to old-style snapshots where the entirety of the range is sent over the stream as SnapshotRequests. Future changes will add better support for detection of when different nodes point to different blob storage buckets / shared storage locations, and incorporate that in rebalancing. Fixes #103028. Co-authored-by: Bilal Akhtar <[email protected]>
- Loading branch information
Showing
12 changed files
with
602 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 7 additions & 13 deletions
20
pkg/kv/kvserver/rditer/testdata/TestReplicaDataIterator/r1/replicatedOnly/user-only/output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
echo | ||
---- | ||
+----------------------------+--------------------------------------------------------+--------------+--------------------+---------------------------------------------------------------------+ | ||
| SPAN | KEY HEX | ENDKEY HEX | VERSION HEX | PRETTY | | ||
+----------------------------+--------------------------------------------------------+--------------+--------------------+---------------------------------------------------------------------+ | ||
| /Local/RangeID/1/{r""-s""} | 016989726162632d120ce61c175eb445878c36dcf4062ada4c0001 | | | /Local/RangeID/1/r/AbortSpan/"0ce61c17-5eb4-4587-8c36-dcf4062ada4c" | | ||
| /Local/RangeID/1/{r""-s""} | 016989726162632d129855a1ef8eb94c06a106cab1dda78a2b0001 | | | /Local/RangeID/1/r/AbortSpan/"9855a1ef-8eb9-4c06-a106-cab1dda78a2b" | | ||
| /Local/RangeID/1/{r""-s""} | 016989726c67632d | | | /Local/RangeID/1/r/RangeGCThreshold | | ||
| /Local/RangeID/1/{r""-s""} | 016989727261736b | | | /Local/RangeID/1/r/RangeAppliedState | | ||
| /Local/RangeID/1/{r""-s""} | 01698972726c6c2d | | | /Local/RangeID/1/r/RangeLease | | ||
| /Local/RangeID/1/{r""-s""} | 016989723a61 | 016989723a78 | 000000000000000109 | /Local/RangeID/1/r":{a"-x"}/0.000000001,0 | | ||
| {a-b} | 61 | | 0000000000000001 | "a"/0.000000001,0 | | ||
| {a-b} | 61ffffffff | | 0000000000000001 | "a\xff\xff\xff\xff"/0.000000001,0 | | ||
| {a-b} | 61 | 62 | 000000000000000109 | {a-b}/0.000000001,0 | | ||
+----------------------------+--------------------------------------------------------+--------------+--------------------+---------------------------------------------------------------------+ | ||
+-------+------------+------------+--------------------+-----------------------------------+ | ||
| SPAN | KEY HEX | ENDKEY HEX | VERSION HEX | PRETTY | | ||
+-------+------------+------------+--------------------+-----------------------------------+ | ||
| {a-b} | 61 | | 0000000000000001 | "a"/0.000000001,0 | | ||
| {a-b} | 61ffffffff | | 0000000000000001 | "a\xff\xff\xff\xff"/0.000000001,0 | | ||
| {a-b} | 61 | 62 | 000000000000000109 | {a-b}/0.000000001,0 | | ||
+-------+------------+------------+--------------------+-----------------------------------+ |
20 changes: 7 additions & 13 deletions
20
pkg/kv/kvserver/rditer/testdata/TestReplicaDataIterator/r2/replicatedOnly/user-only/output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
echo | ||
---- | ||
+----------------------------+--------------------------------------------------------+--------------+--------------------+---------------------------------------------------------------------+ | ||
| SPAN | KEY HEX | ENDKEY HEX | VERSION HEX | PRETTY | | ||
+----------------------------+--------------------------------------------------------+--------------+--------------------+---------------------------------------------------------------------+ | ||
| /Local/RangeID/2/{r""-s""} | 01698a726162632d120ce61c175eb445878c36dcf4062ada4c0001 | | | /Local/RangeID/2/r/AbortSpan/"0ce61c17-5eb4-4587-8c36-dcf4062ada4c" | | ||
| /Local/RangeID/2/{r""-s""} | 01698a726162632d129855a1ef8eb94c06a106cab1dda78a2b0001 | | | /Local/RangeID/2/r/AbortSpan/"9855a1ef-8eb9-4c06-a106-cab1dda78a2b" | | ||
| /Local/RangeID/2/{r""-s""} | 01698a726c67632d | | | /Local/RangeID/2/r/RangeGCThreshold | | ||
| /Local/RangeID/2/{r""-s""} | 01698a727261736b | | | /Local/RangeID/2/r/RangeAppliedState | | ||
| /Local/RangeID/2/{r""-s""} | 01698a72726c6c2d | | | /Local/RangeID/2/r/RangeLease | | ||
| /Local/RangeID/2/{r""-s""} | 01698a723a61 | 01698a723a78 | 000000000000000109 | /Local/RangeID/2/r":{a"-x"}/0.000000001,0 | | ||
| {b-c} | 62 | | 0000000000000001 | "b"/0.000000001,0 | | ||
| {b-c} | 62ffffffff | | 0000000000000001 | "b\xff\xff\xff\xff"/0.000000001,0 | | ||
| {b-c} | 62 | 63 | 000000000000000109 | {b-c}/0.000000001,0 | | ||
+----------------------------+--------------------------------------------------------+--------------+--------------------+---------------------------------------------------------------------+ | ||
+-------+------------+------------+--------------------+-----------------------------------+ | ||
| SPAN | KEY HEX | ENDKEY HEX | VERSION HEX | PRETTY | | ||
+-------+------------+------------+--------------------+-----------------------------------+ | ||
| {b-c} | 62 | | 0000000000000001 | "b"/0.000000001,0 | | ||
| {b-c} | 62ffffffff | | 0000000000000001 | "b\xff\xff\xff\xff"/0.000000001,0 | | ||
| {b-c} | 62 | 63 | 000000000000000109 | {b-c}/0.000000001,0 | | ||
+-------+------------+------------+--------------------+-----------------------------------+ |
20 changes: 7 additions & 13 deletions
20
pkg/kv/kvserver/rditer/testdata/TestReplicaDataIterator/r3/replicatedOnly/user-only/output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
echo | ||
---- | ||
+----------------------------+--------------------------------------------------------+--------------+--------------------+---------------------------------------------------------------------+ | ||
| SPAN | KEY HEX | ENDKEY HEX | VERSION HEX | PRETTY | | ||
+----------------------------+--------------------------------------------------------+--------------+--------------------+---------------------------------------------------------------------+ | ||
| /Local/RangeID/3/{r""-s""} | 01698b726162632d120ce61c175eb445878c36dcf4062ada4c0001 | | | /Local/RangeID/3/r/AbortSpan/"0ce61c17-5eb4-4587-8c36-dcf4062ada4c" | | ||
| /Local/RangeID/3/{r""-s""} | 01698b726162632d129855a1ef8eb94c06a106cab1dda78a2b0001 | | | /Local/RangeID/3/r/AbortSpan/"9855a1ef-8eb9-4c06-a106-cab1dda78a2b" | | ||
| /Local/RangeID/3/{r""-s""} | 01698b726c67632d | | | /Local/RangeID/3/r/RangeGCThreshold | | ||
| /Local/RangeID/3/{r""-s""} | 01698b727261736b | | | /Local/RangeID/3/r/RangeAppliedState | | ||
| /Local/RangeID/3/{r""-s""} | 01698b72726c6c2d | | | /Local/RangeID/3/r/RangeLease | | ||
| /Local/RangeID/3/{r""-s""} | 01698b723a61 | 01698b723a78 | 000000000000000109 | /Local/RangeID/3/r":{a"-x"}/0.000000001,0 | | ||
| {c-d} | 63 | | 0000000000000001 | "c"/0.000000001,0 | | ||
| {c-d} | 63ffffffff | | 0000000000000001 | "c\xff\xff\xff\xff"/0.000000001,0 | | ||
| {c-d} | 63 | 64 | 000000000000000109 | {c-d}/0.000000001,0 | | ||
+----------------------------+--------------------------------------------------------+--------------+--------------------+---------------------------------------------------------------------+ | ||
+-------+------------+------------+--------------------+-----------------------------------+ | ||
| SPAN | KEY HEX | ENDKEY HEX | VERSION HEX | PRETTY | | ||
+-------+------------+------------+--------------------+-----------------------------------+ | ||
| {c-d} | 63 | | 0000000000000001 | "c"/0.000000001,0 | | ||
| {c-d} | 63ffffffff | | 0000000000000001 | "c\xff\xff\xff\xff"/0.000000001,0 | | ||
| {c-d} | 63 | 64 | 000000000000000109 | {c-d}/0.000000001,0 | | ||
+-------+------------+------------+--------------------+-----------------------------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.