Commit 1af363a
committed
LEP: Unify store get/query/exist interfaces and a define a contract for the store trait
## Problem
`ImmutableStore` had four ways to ask whether a store held an address, each written many times for the store types, and they did not agree. The AWS store resolved the same address two ways and only one of them knew what obliteration was; the replicas sent one request under two names; the remote store downloaded a payload to answer a question about metadata; the composite carried four copies of one fan-out. Nothing said what any of it meant, so each implementation decided for itself, which is why they differed.
## Proposal
Query is unified with exist and becomes a batch interface, responding the best match level found in the store, with a clear contract what the store must uphold in terms of data partitioning.
Both get and metadata reads lose the match level parameter as it was mostly unused and better served by an answer of the best level found - with one `StoreGetData` carrying the fragment, the level and an optional payload, so a caller that loads content learns whether the association was its own.
The store contract is written into the trait and enforced by a battery every store runs: never over-report, may under-report, obliterated never matches, reads do not under-serve and agree with each other, and a match names where it was found.
## Validation
This change also carries the implementation to show what it looks like in practice - the reduced and unified store interface along with the fixes the contract enforcement caught.
```
Imported-PR: #164
Imported-From: 0813eec
Imported-Base: d09b123
Imported-Merge: b83f073
Imported-Author: Mattias Jansson (mjansson)
Signed-off-by: Mattias Jansson <mjansson@gmail.com>
GH-URL: #164
```
Lore-RevId: 555
Lore-Signature: 2acc021e9fee932a40cb45fd89d98db1175bdc3a98380a1cba9e3b78c542f5f71 parent 66fbef3 commit 1af363a
65 files changed
Lines changed: 5121 additions & 3538 deletions
File tree
- docs/proposals
- lore-aws/src
- store
- lore-integration-tests/src
- lore-revision
- src
- branch
- file
- metadata
- repository
- store
- tests
- lore-server/src
- grpc
- handlers
- http
- presigned/repository
- repositories/repository/contents/content
- plugins
- protocol
- replication_store
- storage
- quic
- replication_store_service
- store
- lore-storage/src
- local
- lore-transport/src/quic/storage_service
- lore/src/storage
- scripts/test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
464 | | - | |
| 464 | + | |
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| |||
Lines changed: 790 additions & 0 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
200 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
201 | 205 | | |
202 | 206 | | |
203 | 207 | | |
204 | | - | |
| 208 | + | |
205 | 209 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
215 | | - | |
| 216 | + | |
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
| |||
0 commit comments