Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 1.69 KB

File metadata and controls

35 lines (26 loc) · 1.69 KB

v0.4.0

  • Upgrade better-sqlite3
  • Add prebuilds for Node.js 24

v0.3.2

  • Automatically force peerId to be a number when calling addRemotePeer(peerId) and closeRemotePeer(peerId) to fix startup synchronization detection.
  • Do not return an error when calling the databaseBackupAbsolutePathFn callback if no backup filename is provided.

v0.3.1

  • Fix cron execution by replacing node-cron with croner.

v0.3.0

  • Fixed the connected-peers metric so it now reports the real-time value.
  • Automatically removes dead peers after maxPeerDisconnectionToleranceMs (5 minutes by default).
  • Added a debug log when a peer reconnects.
  • Added amITheLeader() to check whether the current peer is the leader, for cluster-wide operations that must run on a single node.
  • Improved app.event.on('synced', (peerId) => {}): the event is now emitted only once per peer, after initial synchronization is complete.
  • Improved leader election stability: in split-brain situations, leader changes are delayed until maxPeerDisconnectionToleranceMs has elapsed, reducing election flapping.
  • Added automatic backups scheduled with databaseBackupCron.
  • Added databaseBackupAbsolutePathFn(backupType = 'scheduled', next) to define where backups are written.
  • Added support for shutdown backups.
  • Added backup events:
    • backup:completed
    • backup:failed
    • backup:progress
  • Added controlled shutdown with app.exit((err, backupType, backupPath) => {}):
    • leaders can trigger a shutdown backup
    • non-leaders wait until their patches have been fully replicated to other peers
    • if synchronization does not complete within 5 × heartbeatIntervalMs, an error is logged and shutdown continues