mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-26 01:10:04 +08:00
Address Markus's comments
This commit is contained in:
parent
f6dc54ebbe
commit
c913f89227
@ -49,9 +49,21 @@ receive resolution response, along with metadata mutations happend at other prox
|
|||||||
its commit version, and apply all these metadata mutations in the commit order.
|
its commit version, and apply all these metadata mutations in the commit order.
|
||||||
Finally, this proxy only writes metadata mutations in its own transaction batch to TLogs,
|
Finally, this proxy only writes metadata mutations in its own transaction batch to TLogs,
|
||||||
i.e., do not write other proxies' metadata mutations to TLogs to avoid repeated writes.
|
i.e., do not write other proxies' metadata mutations to TLogs to avoid repeated writes.
|
||||||
Notably `\xff\x02` prefix is used for backup data and is *NOT* metadata mutations.
|
|
||||||
|
|
||||||
## How is transaction state store persisted?
|
It's worth calling out that everything in the `txnStateStore` is stored at some storage
|
||||||
|
servers and a client (e.g., `fdbcli`) can read from these storage servers. During the
|
||||||
|
commit process, commit proxies parse all mutations in a batch of transactions, and apply
|
||||||
|
changes (i.e., metadata mutations) to its in-memory copy of `txnStateStore`. Later, the
|
||||||
|
same changes are applied at storage servers for persistence. Additionally, the process
|
||||||
|
to store `txnStateStore` at log system is described below.
|
||||||
|
|
||||||
|
Notably `applyMetadataMutations()` is the function that commit proxies use to make changes
|
||||||
|
to `txnStateStore`. The key ranges stored in `txnStateStore` include `[\xff, \xff\x02)` and
|
||||||
|
`[\xff\x03, \xff\xff)`, but not everything in these ranges. There is no data in the range
|
||||||
|
of `[\xff\x02, \xff\x03)` belong to `txnStateStore`, e.g., `\xff\x02` prefix is used for
|
||||||
|
backup data and is *NOT* metadata mutations.
|
||||||
|
|
||||||
|
## How is transaction state store persisted at log system?
|
||||||
|
|
||||||
When a commit proxy writes metadata mutations to the log system, the proxy assigns a
|
When a commit proxy writes metadata mutations to the log system, the proxy assigns a
|
||||||
"txs" tag to the mutation. Depending on FDB versions, the "txs" tag can be one special
|
"txs" tag to the mutation. Depending on FDB versions, the "txs" tag can be one special
|
||||||
|
Loading…
x
Reference in New Issue
Block a user