Skip to content

Commit

Permalink
sql: add force_flush_index to internal.kv_flow_control_handles_v2
Browse files Browse the repository at this point in the history
Add a new column `force_flush_index` to
`crdb_internal.kv_flow_control_handles_v2`.

The column value represents an index up to (and including) which the
range controller running in pull mode must force-flush all send streams.

Part of: cockroachdb#132614
Release note: None
  • Loading branch information
kvoli committed Dec 2, 2024
1 parent 0621fd5 commit 3895b1b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/sql/crdb_internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -9001,6 +9001,7 @@ CREATE TABLE crdb_internal.kv_flow_control_handles_v2 (
total_tracked_tokens INT NOT NULL,
total_eval_deducted_tokens INT NOT NULL,
total_send_deducted_tokens INT NOT NULL,
force_flush_index INT NOT NULL,
INDEX(range_id)
);`,

Expand Down Expand Up @@ -9082,6 +9083,7 @@ func populateFlowHandlesResponseV2(
tree.NewDInt(tree.DInt(totalTrackedTokens)),
tree.NewDInt(tree.DInt(connected.TotalEvalDeductedTokens)),
tree.NewDInt(tree.DInt(connected.TotalSendDeductedTokens)),
tree.NewDInt(tree.DInt(handle.ForceFlushIndex.Index)),
); err != nil {
return err
}
Expand Down

0 comments on commit 3895b1b

Please sign in to comment.