Skip to content

feat(topology): track per-shard row counts#3

Closed
gtarraga wants to merge 2 commits into
Ankcorn:mainfrom
gtarraga:row-count
Closed

feat(topology): track per-shard row counts#3
gtarraga wants to merge 2 commits into
Ankcorn:mainfrom
gtarraga:row-count

Conversation

@gtarraga
Copy link
Copy Markdown
Contributor

@gtarraga gtarraga commented Jan 1, 2026

  • Added row_count column to table_shards table
  • INSERT and DELETE update row count
  • Resharding sets the row count after data migration
  • Schema migration to maintain compatibility just in case
  • Updated LLM docs to be synced with the new code

}

if (deltaByShard.size > 0) {
await topologyStub.batchBumpTableShardRowCounts(tableName, deltaByShard);
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not too sure we want to be going back and tracking this in the topology, it's going to add an extra DO operation which increases cost. The topology is also a single point of failure and increasing writes to it will lower our total possible throughput

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, I didnt realise about the new DO storage costs. Lets scrap this then

@gtarraga gtarraga closed this Jan 1, 2026
@gtarraga gtarraga deleted the row-count branch January 1, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants