Builds the copy-ahead spec approved in #354 (docs/spec/features/blob-store-copy-ahead.md). Closes#341.
Plan (CA-1):inbuxa:BlobStoreChange/set create with target (an x:BlobStore value). The store is opened and a probe blob written, read back and deleted. Refused for the same place, a second plan, an unsettled change, or a store that can't be used.
Copy ahead (CA-2):action: "copy" on a planned change copies from the current store to the planned one. Same walk, hash check and throttle as the copy after a change, and the same one-copy-at-a-time rule. copied resolves nothing. Refused if the blob store moved since planning.
Nothing else changes (CA-3): not read through, no snapshot refusal, writes and reads go to the current store.
Deletes follow (CA-4): a delete on the current store also goes to the planned store; its errors are logged, not returned. Every node picks up a plan within a minute.
The switch (CA-5): a start with the planned store's setting turns the plan into the change: stage: changed, copiedAhead kept, and its copy-ahead problems cleared. A running copy ahead is cut short.
apply (CA-7): writes the target to x:BlobStore once the copy ahead ended copied, once.
Dismiss (CA-8) forgets it and stops deletes following.
The server now keeps its blob store in the read-through wrapper from start-up, even with nothing to read through, so a plan made while it runs takes effect without a restart. Every backend call already handled the wrapper; two tests that matched the bare variant now look at current().
A planned store's settings are never returned by get, and target is redacted in the audit log. The audit's name rules wouldn't catch nested S3 credentials such as secretKey and sessionToken. New appliedBy is in the privacy catalog.
Tests: fmt, build, fork checks. Model tests: planning and its refusals, the switch, a plan for somewhere else staying planned, the switch cutting a copy ahead short, old records reading as changed. Store test: deletes following, errors not failing a delete. Audit test: target redacted.
system::blob_store_change now also runs the whole copy-ahead path against a real server: plan, refusals, deletes following, copy ahead, apply, the switch, late mail read through, and a last pass copying only what came after. It passes with blobs in the data store and with BLOB_STORE=FileSystem. store_snapshot, store_check and scaleout_blob_tests pass too.
system::audit fails at audit.rs:261 (invalidForeignKey on a share); it fails the same way on main without this change.
Not in this PR (spec "Not yet"): the console form, inbuxa-cli store commands, and a docs section.
Builds the copy-ahead spec approved in #354 (`docs/spec/features/blob-store-copy-ahead.md`). Closes #341.
- **Plan (CA-1):** `inbuxa:BlobStoreChange/set` create with `target` (an `x:BlobStore` value). The store is opened and a probe blob written, read back and deleted. Refused for the same place, a second plan, an unsettled change, or a store that can't be used.
- **Copy ahead (CA-2):** `action: "copy"` on a planned change copies from the current store to the planned one. Same walk, hash check and throttle as the copy after a change, and the same one-copy-at-a-time rule. `copied` resolves nothing. Refused if the blob store moved since planning.
- **Nothing else changes (CA-3):** not read through, no snapshot refusal, writes and reads go to the current store.
- **Deletes follow (CA-4):** a delete on the current store also goes to the planned store; its errors are logged, not returned. Every node picks up a plan within a minute.
- **The switch (CA-5):** a start with the planned store's setting turns the plan into the change: `stage: changed`, `copiedAhead` kept, and its copy-ahead problems cleared. A running copy ahead is cut short.
- **apply (CA-7):** writes the target to `x:BlobStore` once the copy ahead ended `copied`, once.
- **Dismiss (CA-8)** forgets it and stops deletes following.
The server now keeps its blob store in the read-through wrapper from start-up, even with nothing to read through, so a plan made while it runs takes effect without a restart. Every backend call already handled the wrapper; two tests that matched the bare variant now look at `current()`.
A planned store's settings are never returned by `get`, and `target` is redacted in the audit log. The audit's name rules wouldn't catch nested S3 credentials such as `secretKey` and `sessionToken`. New `appliedBy` is in the privacy catalog.
**Tests:** fmt, build, fork checks. Model tests: planning and its refusals, the switch, a plan for somewhere else staying planned, the switch cutting a copy ahead short, old records reading as `changed`. Store test: deletes following, errors not failing a delete. Audit test: `target` redacted.
`system::blob_store_change` now also runs the whole copy-ahead path against a real server: plan, refusals, deletes following, copy ahead, apply, the switch, late mail read through, and a last pass copying only what came after. It passes with blobs in the data store and with `BLOB_STORE=FileSystem`. `store_snapshot`, `store_check` and `scaleout_blob_tests` pass too.
`system::audit` fails at audit.rs:261 (invalidForeignKey on a share); it fails the same way on main without this change.
Not in this PR (spec "Not yet"): the console form, `inbuxa-cli store` commands, and a docs section.
A create of inbuxa:BlobStoreChange with a target (an x:BlobStore value)
plans a change from where the blob store is now. The target is opened
and probed first; planning is refused for the same place, a second
plan, an unsettled change, or a store that can't be written.
Copying a planned change copies from the current store to the planned
one, with the same walk, checks and throttle as the copy after a
change. While it's planned, deletes on the current store also go to
the planned store. Nothing reads from it and a snapshot isn't refused.
apply writes the target to the blob store setting once the copy ahead
ended copied. When a node starts with that setting, the planned change
becomes the change, with the copy ahead kept as copiedAhead, so the
last pass copies only what was written in between.
The server now keeps its blob store in the read-through wrapper from
start-up, so a plan takes effect without a restart. A planned store's
settings are never returned and are redacted in the audit log.
Spec: docs/spec/features/blob-store-copy-ahead.md (#341).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Builds the copy-ahead spec approved in #354 (
docs/spec/features/blob-store-copy-ahead.md). Closes #341.inbuxa:BlobStoreChange/setcreate withtarget(anx:BlobStorevalue). The store is opened and a probe blob written, read back and deleted. Refused for the same place, a second plan, an unsettled change, or a store that can't be used.action: "copy"on a planned change copies from the current store to the planned one. Same walk, hash check and throttle as the copy after a change, and the same one-copy-at-a-time rule.copiedresolves nothing. Refused if the blob store moved since planning.stage: changed,copiedAheadkept, and its copy-ahead problems cleared. A running copy ahead is cut short.x:BlobStoreonce the copy ahead endedcopied, once.The server now keeps its blob store in the read-through wrapper from start-up, even with nothing to read through, so a plan made while it runs takes effect without a restart. Every backend call already handled the wrapper; two tests that matched the bare variant now look at
current().A planned store's settings are never returned by
get, andtargetis redacted in the audit log. The audit's name rules wouldn't catch nested S3 credentials such assecretKeyandsessionToken. NewappliedByis in the privacy catalog.Tests: fmt, build, fork checks. Model tests: planning and its refusals, the switch, a plan for somewhere else staying planned, the switch cutting a copy ahead short, old records reading as
changed. Store test: deletes following, errors not failing a delete. Audit test:targetredacted.system::blob_store_changenow also runs the whole copy-ahead path against a real server: plan, refusals, deletes following, copy ahead, apply, the switch, late mail read through, and a last pass copying only what came after. It passes with blobs in the data store and withBLOB_STORE=FileSystem.store_snapshot,store_checkandscaleout_blob_testspass too.system::auditfails at audit.rs:261 (invalidForeignKey on a share); it fails the same way on main without this change.Not in this PR (spec "Not yet"): the console form,
inbuxa-cli storecommands, and a docs section.