microsoft / microsoft/duroxide-pg

Drop unused execution_id column from kv_store table

Open
#3 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
44
Forks
25
Avg merge
1d 14h
Merged PRs (30d)
2

Description

Background

With the KV delta table change (duroxide 0.1.26), the execution_id column in the kv_store table is no longer read by any code path. KV pruning is now instance-scoped (not execution-scoped), and the column serves no purpose.

Current state

The column was intentionally kept in the 0020 migration for backward compatibility — existing deployments have the column populated, and dropping it during a rolling upgrade could cause issues with old nodes that still write to it.

Action

In a future release (after all deployments are on the kv_delta version):

  1. Create a new migration that:
    • ALTER TABLE kv_store DROP COLUMN execution_id;
    • DROP INDEX IF EXISTS idx_kv_store_execution;
  2. Update any stored procedures that still reference execution_id in the kv_store INSERT path

Priority

Low — the column is harmless, just wastes a few bytes per row.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the 0020 migration and inspecting the current kv_store schema, idx_kv_store_execution index, and stored procedures that handle kv_store inserts. Create the future migration to remove the column and index, update procedures that still reference execution_id, and verify the migration is compatible with the stated kv_delta rollout stage.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.