Skip to content

[raft] Pass down locality - #1627

Merged
mickmis merged 1 commit into
interuss:masterfrom
Orbitalize:pass_down_locality
Aug 31, 2026
Merged

[raft] Pass down locality#1627
mickmis merged 1 commit into
interuss:masterfrom
Orbitalize:pass_down_locality

Conversation

@MariemBaccari

@MariemBaccari MariemBaccari commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Chained PR: #1627 -> #1642 -> #1643 -> #1644 -> #1645 -> #1646 -> #1649 -> #1650 -> #1651 -> #1653 -> #1654 -> #1656 -> #1657 -> #1655 -> #1666 -> #1667 -> #1668 -> #1669

Pass down locality through consensus (needed for rid operations) mirroring the timestamp middleware.

@MariemBaccari
MariemBaccari force-pushed the pass_down_locality branch 3 times, most recently from 245f829 to 3df8b12 Compare August 12, 2026 08:41
@MariemBaccari
MariemBaccari force-pushed the pass_down_locality branch 3 times, most recently from 63c7faa to 9e91adf Compare August 19, 2026 09:50
@MariemBaccari
MariemBaccari marked this pull request as ready for review August 19, 2026 09:53
@MariemBaccari
MariemBaccari force-pushed the pass_down_locality branch 2 times, most recently from 7d31bbb to d214912 Compare August 19, 2026 12:12
@barroco barroco added the dss-raft Relating to the application-layer consensus implemenation based on raft label Aug 20, 2026

@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 modulo naming suggestion.
PS: this could be applied too to the timestamp package too.

Comment thread pkg/locality/locality.go

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.

About naming in this file: it is go-idiomatic to drop the package name from the entities contained in the package. In addition I suggest following doc of context.Value out of consistency. E.g. here:

  • type key struct {}
  • FromContext(ctx context.Context) (string, error or bool) {}
  • MustFromContext(ctx context.Context) string {}
  • NewContext(ctx context.Context, locality string) context.Context {}
  • Middleware(locality string) func(...) ... {}

@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 modulo naming suggestion.
PS: this could be applied too to the timestamp package too.

@MariemBaccari

Copy link
Copy Markdown
Contributor Author

@mickmis I opened #1668 to address the naming comment for both timestamp and locality at the same time.

@mickmis

mickmis commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Note: ignored CI failure, which was flakyness (PR on top of this one succeeded).

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