swift/swift/container
Matthew Oliver 8227f4539c sharding: don't replace own_shard_range without an epoch
We've observed a root container suddenly thinks it's unsharded when it's
own_shard_range is reset.  This patch blocks a remote osr with an epoch
of None from overwriting a local epoched OSR.

The only way we've observed this happen is when a new replica or handoff
node creates a container and it's new own_shard_range is created without
an epoch and then replicated to older primaries.

However, if a bad node with a non-epoched OSR is on a primary, it's
newer timestamp would prevent pulling the good osr from it's peers.  So
it'll be left stuck with it's bad one.

When this happens expect to see a bunch of:
    Ignoring remote osr w/o epoch: x, from: y

When an OSR comes in from a replica that doesn't have an epoch when
it should, we do a pre-flight check to see if it would remove the epoch
before emitting the error above. We do this because when sharding is
first initiated it's perfectly valid to get OSR's without epochs from
replicas. This is expected and harmless.

Closes-bug: #1980451
Change-Id: I069bdbeb430e89074605e40525d955b3a704a44f
2024-02-07 13:37:58 -08:00
..
__init__.py Initial commit of Swift code 2010-07-12 17:03:45 -05:00
auditor.py Refactor db auditors into a db_auditor base class 2021-04-09 12:01:21 +10:00
backend.py Container-server: add container namespaces GET 2024-01-11 10:46:53 +00:00
reconciler.py Modify log_name in internal clients' pipeline configs 2022-01-12 11:07:25 +00:00
replicator.py sharding: don't replace own_shard_range without an epoch 2024-02-07 13:37:58 -08:00
server.py Container-server: add container namespaces GET 2024-01-11 10:46:53 +00:00
sharder.py Proxy: Use namespaces when getting listing/updating shards 2024-01-11 10:46:53 +00:00
sync.py Various doc formatting cleanups 2022-08-02 14:28:36 -07:00
sync_store.py Container-Sync to iterate only over synced containers 2016-01-06 16:46:31 +02:00
updater.py systemd: Send STOPPING/RELOADING notifications 2023-10-16 15:44:06 -07:00