Skip to content

ubusio v0.2.2

Latest

Choose a tag to compare

@ddffcczz ddffcczz released this 04 Dec 15:03
· 2 commits to main since this release

Pre-1.0: the API may still change. No change of the exported API against v0.2.1.

Fixes three defects of subscriptions and notifications.

Changed behaviour

  • Unsubscribe and UnsubscribeID carry the removal through whatever happens to their context, which bounds only the wait. A later subscription to the same object is sent after it. While the connection is lost they return nil: the subscription went with the session.
  • NotifyWait returns one result for a subscriber that ubusd lists several times. It is done when every delivery is answered, holds the data of all and the first status other than StatusOK.

Fixed

  • Unsubscribe or UnsubscribeID with an already ended context forgot the subscription without removing it at ubusd; subscribing again then delivered twice.
  • A target removed before the subscription to it was recorded left a path subscription marked as made, so it was not made again when the object returned. A watched path now stays pending; a Subscribe that was making the subscription returns StatusNotFound.
  • NotifyWait did not return before its context ended when another client had subscribed the same subscriber to the object twice.

Known issues

  • If the removal request of Unsubscribe or UnsubscribeID cannot be sent in time, the subscription stays at ubusd until the Subscriber is closed, and subscribing again then delivers twice. See the changelog.

Verification

Compatibility and unit tests on an MT7981 router (OpenWrt 25.12.5, arm64) and an Orange Pi Zero (OpenWrt 21.02.2, ARMv7); an arm64 virtual machine with ubusd of OpenWrt 21.02 and 25.12 (race detector included); scripts/ci.sh and GitHub Actions.
10 minute stress runs passed on both routers. Not run for this release: emulation, 10 minute stress runs on the virtual machine, benchmarks:
docs/compatibility.md.

See CHANGELOG.md.