Files
swift/test/unit/container
Matthew Oliver 08da83c193 DB: Encode the device to the DB id
Currently the DB ids, used to identify a database broker, is a uuid
(uuid4). This is a great unique identifier, however we don't tend to
track DB ids.
When we replicate to other primaries or nodes. We track which brokers we
replicate with or replicate with us via the incoming_sync and
outgoing_sync tables. These contain the DB id of the broker in question
and a timestamp.
These tables entries do get reclaimed over time, so gives us a nice
snapshot of whose been replicating with us.

Unfortuantly however, as we don't track these UUIDs to a broker or node
when we want to go look at these tables in search for replication problems
we tend to be at a loss.

This patch helps to identify the source by adding the device to the DB
id:

   <uuid4>-<device>

The patch uses the device as written in the path of the broker. Now when
we look into the sync tables we can look up in the ring and know exactly
which node it came from (or talking to). Although this only helps if you
use unique device names across the cluster.

An ID is generated when an account or container is first initialised.
But also after an rsync or rsyn_then_merge on the RPC (new location) side.
So as things replicate we'll get updated device's in the ID, which will also
show up in syncs in the future as the new node starts to replicate.

When applied to an existing cluster, there will be a mix of <uuid4> and
<uuid4 + device> IDs. But these ids are just text, and they will slowly
change as things get replicated/rebalanced around.

Change-Id: I58063c3830fb7b01c26fe1fa5aaec6353ff555c6
2022-02-07 17:05:26 +11:00
..
2010-07-12 17:03:45 -05:00