Skip to content

sql_store: S3 and filesystem object stores (slice 1b PR B) - #441

Merged
samgbafa merged 11 commits into
mainfrom
tc1491/1b-pr-b
Oct 25, 2026
Merged

samgbafa merged 11 commits into
mainfrom
tc1491/1b-pr-b

Conversation

@samgbafa

@samgbafa samgbafa commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Adds the S3 and filesystem backends of the SQL object store trait. Neither is started by the node yet.

  • S3SqlObjectStore: conditional create (If-None-Match: *) with the SHA-256 as user metadata; a 412 is accepted only after the stored length and hash match. A startup probe under sql/v1/_probe/ selects conditional or check-then-create mode and logs the mode once. Range reads and head.
  • FsSqlObjectStore: temp file, fsync, hard-link create under {datadir}/sql-store; boot checks for the root (absolute, outside the block store root).
  • Conformance tests shared by the in-memory, filesystem and S3 stores. The S3 store runs against an in-process S3 API, and in the at-rest-harness job against the harness MinIO (new step, --test sql_object_store -- --ignored).
  • The S3 block store's start-up size scan lists the tinycloud: key prefix; the sizes it computes are unchanged (test included).
  • Docs: docs/sql-block-store-contract.md section 12. CHANGELOG line.

The conditional-create conformance test against MinIO takes about two minutes; per-call timeouts for the uploader are chosen with this in mind.

Details: TC-1491

Naomi added 7 commits October 24, 2026 03:51
Adds the S3 and filesystem backends of SqlObjectStore. Objects are
created at most once and never replaced.

- S3: conditional create (If-None-Match: *) with the SHA-256 as user
  metadata, a startup probe that selects conditional or check-then-create
  mode, range reads and head.
- Filesystem: temp file, fsync, hard link create under {datadir}/sql-store,
  with boot checks for the root.
- Conformance tests shared by the in-memory, filesystem and S3 stores;
  S3 tests run against an in-process S3 API and, in the at-rest-harness
  job, against the harness MinIO.
- The S3 block store's start-up size scan lists the tinycloud: key prefix.

Details: TC-1491
…t conditional PUTs on the provider

Details: TC-1491
@samgbafa

Copy link
Copy Markdown
Contributor Author

APPROVE: see TC-1491 (reviewed exact head 8d69358)

- The probe maps only 501 and NotImplemented to check-then-create; any other
  status is an error. The deciding answer's status and code are logged with
  the mode, and a rejected conditional create reports its status and code.
- The per-key gate is released by a guard, so a cancelled create leaves no
  entry behind.
- Relative filesystem roots are made absolute before the block store root
  check; the parent of an existing directory is fsynced on create.
- The S3 scan prefix and the space id text share one constant,
  SPACE_ID_PREFIX.
- Tests that planted different bytes derive them from the wanted bytes.
- The new CI step has a 10 minute timeout. Contract section 12 updated.

Details: TC-1491
@samgbafa

Copy link
Copy Markdown
Contributor Author

APPROVE: see TC-1491 (reviewed exact head 635d73c)

1 similar comment
@samgbafa

Copy link
Copy Markdown
Contributor Author

APPROVE: see TC-1491 (reviewed exact head 635d73c)

@samgbafa
samgbafa marked this pull request as ready for review October 24, 2026 06:28
Naomi and others added 2 commits October 25, 2026 21:34
# Conflicts:
#	CHANGELOG.md
#	tinycloud-node-server/src/storage/mod.rs
#	tinycloud-node-server/src/storage/s3.rs
@samgbafa

Copy link
Copy Markdown
Contributor Author

APPROVE: see TC-1491 (reviewed exact head ec5ee9b)
This head merges main af5c213 (with generation-keyed blob keys) into the approved 635d73c lineage. The merge resolution keeps main's generation-aware key_for/key unchanged, adds only the scan-prefix constant and prefix filter, and points the new key-shape test at key_for for generation 0 and a non-zero generation. Behind main 0; CHANGELOG diff has no removed lines.

@samgbafa

Copy link
Copy Markdown
Contributor Author

APPROVE: see TC-1491 (reviewed exact head 6784b7e)
This head is a plain merge of main cdd415c (Release 1.24.0) into the previously approved head ec5ee9b; the non-CHANGELOG patch-id is unchanged (7c01ce43...), behind main 0.

@samgbafa
samgbafa merged commit d328eb4 into main Oct 25, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant