Skip to content

tongs 2.0.1

Latest

Choose a tag to compare

@github-actions github-actions released this 14 Oct 21:49

Fixed

  • A new generation's file mode is now set through the open temporary file (fchmod) before it is written and synced. A path-based chmod could follow a symlink that another user with write access to the directory had planted at the temporary path. The file's fsync now covers the mode as well.
  • With fsync(true), the store now also fsyncs the parent of every directory it creates for a new file. After a power loss, the new directories survive together with the file renamed into them.
  • A lock wait with no timeout (lock_timeout(None)) now blocks in the kernel and wakes as soon as the holder releases the lock.

Faster

  • The CLI parses the store once instead of twice. On a 1.6 MB store, get takes 24 ms instead of 45 ms, dump 30 ms instead of 52 ms and set 42 ms instead of 63–76 ms.
  • Lock hand-off: a waiter with no timeout gets a released lock in 0.05 ms (median; it was 18.9 ms). A waiter with a timeout now gets it in 5.9 ms (it was 17.9 ms).
  • Serialisation is about 25% faster: 1.6 MB of indented JSON is written in 3.8–4.1 ms instead of 5.1–6.0 ms.

Full Changelog: v2.0.0...v2.0.1