Repository navigation
v0.39.0
Highlights
This release changes no behaviour in s2, the backends or s2-server: outside tests and s2test, the Go changes since v0.38.0 are comments only. It is for Storage implementers: s2test gains one check and TestStorageExists asserts more, so a backend whose tests call it can start failing on this upgrade.
s2test.TestStorageObjectConcurrencyreads an object's accessors on 8 goroutines at once (#589, fixes #498). It is the check the v0.30.0 notes said was missing, when s2-server began readingMetadata()concurrently; run it with-race.s2test.TestStorageExistsnow requiresExiststo report a name that only has keys under it (#588, fixes #587), and theStorage.Existsgodoc states that contract. Every bundled backend already answered this way; aStoragefrom outside this repository may not, see Upgrading.
Changes
Features
- s2test:
TestStorageObjectConcurrency(#589, fixes #498) - s2test:
TestStorageExistsalso checks a name that only has keys under it, before and after its last key is deleted (#588, fixes #587)
Documentation
- s2: the
Storage.Existsgodoc says a key atnameor, for a name not ending in/, undername + "/"is present, and no longer says flat backends resolve only leaf objects (#588) - s2: the Concurrency section of the package doc lists
StorageClassamong the accessors safe for concurrent use, and names the new check (#589) - README and docs/backends.md link s2-gdrive, a Google Drive backend in its own repository (#585, #516)
CI / Build
Upgrading
- Submodule consumers:
go get github.com/mojatter/s2/<module>@v0.39.0 - s2-server operators running the image:
docker pull mojatter/s2-server:0.39.0(:latestpoints at it too) cmd/s2-server/v0.39.0is published separately, shortly after:go install github.com/mojatter/s2/cmd/s2-server@v0.39.0- No module's
godirective moved andgo.workis unchanged since v0.38.0. - No configuration changes and no change to the data at rest; downgrading to v0.38.0 is safe.
Library users
- Nothing to do: the godoc changes describe what the bundled backends already did, and no behaviour changes.
Storage implementers
s2test.TestStorageExists: aStoragewhoseExistsanswers only for stored keys now fails it; on a miss, probe for a key undername + "/". AStoragethat keeps a directory after its last key is deleted fails it too; remove emptied directories onDelete, asosfsandmemfsdo, and keep that removal from running beside a write into the same directory: onosfsandmemfsit made such writes fail from v0.20.2 until the locks of v0.21.0 (#317, docs/backends.md). A name ending in/must still report only a stored marker.s2test.TestStorageObjectConcurrency: new. It reads every accessor of objects fromList,Getands2.Staton 8 goroutines at once and compares what they read. Add it to your backend's tests, since no other check runs it, and run them with-race; without the race detector it does not see an unsynchronized lazy accessor.- No other
s2testcheck changed since v0.38.0.
s2-server operators
- Nothing changes and there is nothing to do; this version has no section in docs/upgrading.md.