Breaking changes:
- When creating a new repo, the first commit is now always empty.
Repo.create_from_commithas been removed; all repos should now be created withRepo.create. - Removed
Repo.apply_writes,format_commit,apply_commit, andwrites_to_commit_ops. Use the newStorage.commitmethod instead. - If no sequence number has ever been allocated for a given NSID,
Storage.last_seqnow returnsNone, and does not initialize the sequence.
Non-breaking changes:
Add new feature to allocate sequence numbers from memcache, atomically, backed by the datastore in batches. Reduces datastore contention when writing commits at 5-10qps and higher. Enable by passing a MemcacheSequences to the DatastoreStorage constructor; configure with the MEMCACHE_SEQUENCE_BUFFER and MEMCACHE_SEQUENCE_BATCH environment variables.
- Add new
SUBSCRIBE_REPOS_SKIPPED_SEQ_WINDOWandSUBSCRIBE_REPOS_SKIPPED_SEQ_DELAYenvironment variables forsubscribeRepos(firehose) serving. AtpRemoteBlob:- Add
reposproperty to track which repos have which blobs. - Switch image handling to pymediainfo, drop Pillow dependency.
- Add
did:- Add new
rollback_plcfunction. resolve_handle: raiseValueErrorif the handle has an_(underscore), since Bluesky handles don't allow them.
- Add new
firehose:- Omit
prevDatain initial commits instead of setting it tonull. (It's not a nullable field insubscribeRepos#commit.)
- Omit
repo:- Add
lost_seqkwarg to repo callback for marking sequence numbers lost.
- Add
storage:- Add new abstract
Sequencesclass and concrete subclassesMemorySequences,DatastoreSequences, andMemcacheSequences. - Add new optional
sequenceskwarg toStorageand subclasses' constructors.
- Add new abstract
xrpc_repo:describe_repo: addapp.bsky.graph.listblock.
xrpc_sync:get_blob: periodically check remote blobs with HTTP GET requests to see if they're still serving.get_record: include MST covering proof blocks for record.- Implement
listBlobs. subscribeRepos/firehose: handle uncaught exceptions and continue serving (snarfed/bridgy-fed#2150).