Liking cljdoc? Tell your friends :D

Changelog

All notable, user-visible changes to konserve-gcs are documented here.

Unreleased

Changed

  • Storage clients are shared, and a store no longer closes its client. Every store-exists?, create-store, connect-store and delete-store call built its own Storage client; connect-store through konserve.store built two and closed neither until release. cloud-storage-client now returns one shared client per :project-id and :host, as konserve-s3 does per endpoint. release and delete-store used to close the store's client, including one the caller had passed in under :client, which then failed under every other store using it (a sibling store, or a reconnect). They no longer close anything. Call konserve-gcs.core/shutdown-clients! on process exit to close the shared clients; a client you pass in is yours to close.

Fixed

  • A transient Google 5xx no longer fails a write for good. Every overwrite first copies the old object to <key>.backup with a server-side rewrite. The Google client library retries only operations that it can prove are safe to repeat, and a rewrite with no generation precondition is not one of them, so a single 503 We encountered an internal error failed the write after one attempt (Unretryable error (attempts: 1, maxAttempts: 6)). In a Datahike server that failure shut the writer down for good. The client now uses the uniform retry strategy, so these calls retry within Google's retry budget. The calls this backing makes without a precondition are harmless to repeat.
  • Connecting to a store works with current konserve again. The GCS backing did not implement -store-exists?, which konserve now probes on every connect (konserve#179). Creating or opening any store failed with AbstractMethodError: CloudStorageBucket._store_exists_QMARK_ is abstract, and Datahike's standalone server, which bundles konserve-gcs with konserve 0.9.394, could not create a :gcs database. -store-exists? now looks for the store's marker object, the same one store-exists? uses.

Added

  • Paged GC sweeps and batch deletion. The GCS backing implements konserve's key pages and non-atomic batch deletion (konserve#196), so konserve.gc/sweep! reads key metadata one GCS list page at a time (:page-size, the page token as cursor) instead of listing every key first, and deletes through GCS batch requests of up to 100 objects instead of one request per object. A missing object counts as deleted. A transient per-object failure (408, 429, 5xx), an unanswered call, and a failed batch request are retried up to *batch-delete-attempts* times (deletes are idempotent); what still fails is reported in :failed, and a batch request that fails every time throws. A reply that does not answer every call is not attributed, since the client pairs answers with calls by position. A gRPC client, which has no batch requests, deletes one object per request; there, only a definite refusal (4xx) is a per-object failure, and anything else throws once retries are spent. Requires konserve 0.9.407+.
  • Read-miss-safe reads (one object fetch, no metadata probe). The GCS backing implements konserve's PReadMissSafe and its read path throws store-key-not-found-ex on a genuine 404. On a konserve that supports the marker the redundant -blob-exists? metadata .get is dropped, so a read is a single object fetch, and read-modify-write ops (update-in / assoc-in / bassoc) skip it too. Requires konserve 0.9.354+.

Changed

  • konserve 0.9.394 → 0.9.407.
  • konserve 0.9.342 → 0.9.354.
  • konserve 0.9.376 → 0.9.394.
  • Logging: switched from taoensso.timbre to org.replikativ/logging — the unified logging library used across the konserve backends. Log events are now keyword-tagged (e.g. :konserve.gcs/creating-bucket).
  • CI now runs the emulator compliance suite (sync + async) against a fake-gcs-server service container, plus a smoke load-check that catches a stale konserve pin; the release is gated on both.

Can you improve this documentation? These fine people already did:
Christian Weilbach & Mark Addleman
Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close