Skip to content

[raft/memstore] Add rid memstore - #1534

Merged
mickmis merged 1 commit into
interuss:masterfrom
Orbitalize:memstore_rid
Jul 30, 2026
Merged

[raft/memstore] Add rid memstore #1534
mickmis merged 1 commit into
interuss:masterfrom
Orbitalize:memstore_rid

Conversation

@the-glu

@the-glu the-glu commented Jun 16, 2026

Copy link
Copy Markdown
Member

This PR is part of a new chain, implementing memstore.

#1525 (Generic raftstore) -> #1527 (Base memstore) -> #1529 (Aux memstore) -> #1530 (Snapshots) -> #1534 (Rid memstore) -> #1535 (Correct use of now) -> #1539 (Checkpoint) -> #1542 (Scd memstore) -> #1528 (First PR with raft using memstore)


It adds rid memstore, with snapshots.

Tests (minus snapshots & transaction & initialization) are identical to SQL tests and form a big part of this PR. They can be checked locally with e.g. diff pkg/rid/store/memstore/identification_service_area_test.go pkg/rid/store/sqlstore/identification_service_area_test.go

'Strange' behavior with limits has been implemented as-is.

Cell index/optimization is reserved for a future PR to keep this one as simple as possible.

@the-glu
the-glu force-pushed the memstore_rid branch 2 times, most recently from ac14b59 to f6a1b38 Compare June 16, 2026 09:06
@barroco barroco added the dss-raft Relating to the application-layer consensus implemenation based on raft label Jun 17, 2026
@the-glu
the-glu force-pushed the memstore_rid branch 2 times, most recently from 880e18a to 316e965 Compare June 29, 2026 07:04

@mickmis mickmis 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.

  • None of those are concurrency-safe, that is expected, right? Maybe clarify that in the doc of the memstore.
  • Is it planned that this is validated somehow by running the prober test suite against it in the CI? It not, it shoudl

Comment thread pkg/rid/store/memstore/store.go Outdated
Comment thread pkg/rid/store/memstore/store.go Outdated
Comment thread pkg/rid/store/memstore/store.go
Comment thread pkg/rid/store/memstore/identification_service_area.go Outdated
Comment thread pkg/rid/store/memstore/identification_service_area.go Outdated
Comment thread pkg/rid/store/memstore/subscriptions.go
Comment thread pkg/rid/store/memstore/subscriptions.go
Comment thread pkg/rid/store/memstore/subscriptions.go Outdated
Comment thread pkg/rid/store/memstore/subscriptions.go Outdated
Comment thread pkg/rid/store/memstore/subscriptions.go Outdated
@the-glu

the-glu commented Jul 28, 2026

Copy link
Copy Markdown
Member Author
  • None of those are concurrency-safe, that is expected, right? Maybe clarify that in the doc of the memstore.

This was stated in a previous PR and is in the code here: https://github.com/interuss/dss/blob/master/pkg/memstore/store.go#L3

Is that enough?

* Is it planned that this is validated somehow by running the prober test suite against it in the CI? It not, it shoudl

It's not expected for the memstore directly to works again the prober test suite: it mean to be internal only and not used directly via HTTPs call (especially since it's not concurrency-safe, on purpose).

Indirect validation (as underlying storage for the raft implementation) is however done in #1538 (when everything is implemented, so tests pass).

@mickmis

mickmis commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

This was stated in a previous PR and is in the code here: > https://github.com/interuss/dss/blob/master/pkg/memstore/store.go#L3
Is that enough?

OK was not aware of that. Sounds good to me, with just one thing: could you move on Store and/or Init so that it is caught by godoc.

It's not expected for the memstore directly to works again the prober test suite: it mean to be internal only and not used directly via HTTPs call (especially since it's not concurrency-safe, on purpose).

Indirect validation (as underlying storage for the raft implementation) is however done in #1538 (when everything is implemented, so tests pass).

👍

Comment thread pkg/rid/store/memstore/store.go
@the-glu
the-glu force-pushed the memstore_rid branch 2 times, most recently from 8a9cbd0 to bcdea4e Compare July 30, 2026 09:28
@the-glu
the-glu force-pushed the memstore_rid branch 2 times, most recently from fb0a005 to 2ce6182 Compare July 30, 2026 10:16
Co-authored-by: Mickaël Misbach <mickael.misbach@orbitalize.com>
@the-glu
the-glu requested a review from mickmis July 30, 2026 10:21

@mickmis mickmis 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.

LGTM


// liveSubscriptionsInCells yields the non-expired subscriptions touching cells,
// optionally restricted to a single owner.
func (r *repo) liveSubscriptionsInCells(cells s2.CellUnion, owner *dssmodels.Owner) iter.Seq[*subscriptionRecord] {

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.

nice

@mickmis
mickmis merged commit abf6584 into interuss:master Jul 30, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dss-raft Relating to the application-layer consensus implemenation based on raft

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants