Skip to content

Session checkout - #108

Merged
lejeunerenard merged 9 commits into
mainfrom
session-checkout
Sep 30, 2026
Merged

lejeunerenard merged 9 commits into
mainfrom
session-checkout

Conversation

@danielchrist0pher

@danielchrist0pher danielchrist0pher commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Needed by core - enables checking out with a timeout.

@danielchrist0pher
danielchrist0pher requested a review from a team September 18, 2026 16:26

@lejeunerenard lejeunerenard left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice if session() used _makeSnaphot() if it needs a snapshot and it could use options. Then it would mean that all new hyperdb instances were isolated to definiing the engine and creating snapshots.

Comment thread index.js Outdated
Comment thread index.js Outdated
danielchrist0pher and others added 7 commits September 30, 2026 08:53
Adds support for setting the session config options on the hyperbee2
engine while remaining generic. The options are stored on the HyperDB
instance because of snapshots being updated during `.update()`.

Engines now support a `snapshotFrom` method which takes the current
snapshot and the options giving a new configured version. This happens
only in `_createSnapshot()` as it is the shared way of creating the new
view / hyperdb instance. `snapshotFrom()` is necessary to maintain the
position of the current snapshot just with options.

This all supports setting the session config not just for transactions,
but also for calling `db.snapshot()` at the top level (aka on HyperDB
instance).
IE the shape is dictated by the underlying engine module so should be
driven by that instead of being enforced at the engine level.
Add noop `snapshotFrom` to the other engines
@lejeunerenard
lejeunerenard added this pull request to stack #111 September 30, 2026 20:03
lejeunerenard
lejeunerenard previously approved these changes Sep 30, 2026
@lejeunerenard
lejeunerenard merged commit 92554de into main Sep 30, 2026
12 checks passed
@lejeunerenard
lejeunerenard deleted the session-checkout branch September 30, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants