Skip to content

kvserver: support different load dimensions in allocation code and cleanup #91152

@kvoli

Description

@kvoli

The allocation code currently hardcodes many references to QPS which makes it difficult to swap out the dimension, without duplicating significant amounts of code.

This is unfortunate as the control mechanism for converging a single load dimension across stores is effective and not limited to just QPS.

The solution is to refactor several sections of the allocation code to support registering and using a different load dimension.

The solution should also involve clearing up interactions between the components in the following areas:

  • pkg/kv/kvserver/allocator/*
  • pkg/kv/kvserver/replicate_queue.go
  • pkg/kv/kvserver/store_rebalancer.go
  • pkg/kv/kvserver/replica_rankings.go
  • pkg/kv/kvserver/replicastats/*
  • pkg/kv/kvserver/replica_load.go
  • pkg/kv/kvserver/replica_metrics.go
  • pkg/kv/kvserver/store.go.Capacity()
  • pkg/kv/kvserver/store.go.updateReplicationGuages()
  • pkg/kv/kvserver/store.go.recordNewPerSecondStats()
  • pkg/kv/kvserver/store.go.GossipStore()

Jira issue: CRDB-21126

Epic CRDB-20845

Metadata

Metadata

Assignees

Labels

A-kv-distributionRelating to rebalancing and leasing.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-kvKV Team

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions