Skip to content
Open
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
1732eb7
Update `TabletBalancer.Pick` signature to accept options
mhamza15 Aug 16, 2025
f37cdc8
Initial implementation of the hash ring
mhamza15 Aug 16, 2025
114fece
Set up initial health check subscription
mhamza15 Aug 16, 2025
4742e8d
Rename to `SessionBalancer` and create initial tests
mhamza15 Aug 16, 2025
5be7ac7
Improvements and add more tests
mhamza15 Aug 17, 2025
80eb92f
Clarify comment
mhamza15 Aug 17, 2025
c421c3d
Remove brackets
mhamza15 Aug 17, 2025
34ca9e9
Clarify comment
mhamza15 Aug 17, 2025
92abecb
Add session hash to session proto
mhamza15 Aug 17, 2025
41141d7
Clarify comment
mhamza15 Aug 17, 2025
70ed65f
Update `SessionHash` to be optional
mhamza15 Aug 18, 2025
0698c2b
Pass in invalid tablets to tablet balancer
mhamza15 Aug 23, 2025
7159adf
Build initial hash rings
mhamza15 Aug 24, 2025
b77e758
Set up health check subscription first to avoid missing changes
mhamza15 Aug 24, 2025
b38c28f
Hash uuid on pick
mhamza15 Aug 25, 2025
df48aa1
Add invalid tablets to `PickOpts`
mhamza15 Aug 25, 2025
a18bab7
Make session uuid not pointer
mhamza15 Aug 25, 2025
f9956e2
Remove unused import
mhamza15 Aug 26, 2025
d60c593
Remove old tablets when a tablet's target changes
mhamza15 Aug 26, 2025
5833a54
Fetch initial tablet state after subscribing to health check
mhamza15 Aug 26, 2025
5bf666d
Revert "Remove old tablets when a tablet's target changes"
mhamza15 Aug 26, 2025
d8723b3
Remove primary tablets from rings
mhamza15 Aug 26, 2025
479cde4
undo formatting
mhamza15 Aug 26, 2025
475408c
Pass session uuid to `withRetry`
mhamza15 Aug 28, 2025
98a7c8b
Fix new types
mhamza15 Aug 28, 2025
f59a14f
Fix tests
mhamza15 Aug 28, 2025
2620b76
Pass `WrapOpts` by value
mhamza15 Aug 28, 2025
e62c88f
Pass `PickOpts` by value
mhamza15 Aug 28, 2025
0db53cd
Change `ExecuteOptions` in `WrapOpts` as a pointer
mhamza15 Aug 28, 2025
cde392c
Fix `balancer-type` help text
mhamza15 Aug 29, 2025
eadf1ae
Fix some bugs
mhamza15 Aug 30, 2025
8fae28c
Get cell from tablet alias rather than target
mhamza15 Aug 30, 2025
cd30d9d
Initial e2e test
mhamza15 Aug 30, 2025
37b7e62
Add more e2e tests
mhamza15 Aug 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove brackets
Signed-off-by: Mohamed Hamza <[email protected]>
  • Loading branch information
mhamza15 committed Aug 28, 2025
commit c421c3d12e0913bceb16cb7e290591e0003bd146
6 changes: 3 additions & 3 deletions go/vt/vtgate/balancer/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
querypb "vitess.io/vitess/go/vt/proto/query"
)

// SessionBalancer implements the [TabletBalancer] interface. For a given session,
// SessionBalancer implements the TabletBalancer interface. For a given session,
// it will return the same tablet for its duration, with preference to tablets in
// the local cell.
type SessionBalancer struct {
Expand All @@ -42,11 +42,11 @@ type SessionBalancer struct {
mu sync.RWMutex

// localRings are the hash rings created for each target. It contains only tablets
// local to [localCell].
// local to localCell.
localRings map[discovery.KeyspaceShardTabletType]*hashRing

// externalRings are the hash rings created for each target. It contains only tablets
// external to [localCell].
// external to localCell.
externalRings map[discovery.KeyspaceShardTabletType]*hashRing
}

Expand Down