Skip to content

fix(udb): add txn tagging#4328

Open
MasterPtato wants to merge 1 commit into02-27-fix_api_make_actor_destroy_wait_for_ackfrom
02-27-fix_udb_add_txn_tagging
Open

fix(udb): add txn tagging#4328
MasterPtato wants to merge 1 commit into02-27-fix_api_make_actor_destroy_wait_for_ackfrom
02-27-fix_udb_add_txn_tagging

Conversation

@MasterPtato
Copy link
Contributor

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@railway-app
Copy link

railway-app bot commented Feb 27, 2026

🚅 Deployed to the rivet-pr-4328 environment in rivet-frontend

Service Status Web Updated (UTC)
frontend-cloud 😴 Sleeping (View Logs) Web Mar 4, 2026 at 4:25 pm
website 😴 Sleeping (View Logs) Web Mar 1, 2026 at 1:27 am
frontend-inspector 😴 Sleeping (View Logs) Web Feb 28, 2026 at 8:23 pm
ladle ❌ Build Failed (View Logs) Web Feb 27, 2026 at 11:49 pm
mcp-hub ✅ Success (View Logs) Web Feb 27, 2026 at 11:48 pm

@MasterPtato MasterPtato mentioned this pull request Feb 27, 2026
11 tasks
Copy link
Contributor Author

MasterPtato commented Feb 27, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@claude
Copy link

claude bot commented Feb 27, 2026

PR Review: fix(udb): add txn tagging

This is a small, focused change that adds transaction tagging support to the UniversalDB abstraction layer.

Summary

The PR adds a tag method to the TransactionDriver trait with a default no-op implementation, and exposes it through the public Transaction::tag API.

Whats Good

  • Correct approach for opt-in functionality. Providing a default no-op implementation on the trait is the right pattern for an optional capability, existing driver implementations (RocksDB, PostgreSQL) do not need to change, and future drivers (e.g. a FoundationDB driver) can override it.
  • Clean and minimal. The change is exactly as large as it needs to be, with no unnecessary complexity.
  • Consistent delegation. Transaction::tag correctly delegates to self.driver.tag(tag), consistent with how other methods in this file are structured.

Observations / Minor Notes

  1. The comment on the trait default is slightly awkward.
    The comment 'No-op unless implemented' is a bit off, the method is implemented (as a no-op). A clearer phrasing would be 'Default no-op. Override to attach a tag to the transaction for profiling or throttling.'

  2. Single-string tag vs. key-value pairs.
    Most tag systems (including FoundationDB transaction tags) use a single opaque byte string, so tag takes a str which is the right signature for FDB. The existing gasoline builder uses .tag(k, v) key-value pairs, but those are independent systems with no conflict. Worth noting if callers ever want key-value semantics here in the future.

  3. No call sites in this PR.
    The method is introduced but not called anywhere in this diff. This appears to be preparatory infrastructure for a downstream PR in the Graphite stack, which is a reasonable approach.

  4. InformalTransaction does not expose tag.
    Transaction now has tag, but InformalTransaction does not. If the downstream PR needs to tag through an informal transaction, this would need to be added. Not a blocker.

Verdict

LGTM. The change is correct, minimal, and follows existing patterns. The default no-op on the trait is the right extensibility mechanism for this kind of optional driver capability.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 27, 2026

More templates

@rivetkit/cloudflare-workers

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/cloudflare-workers@4328

@rivetkit/framework-base

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/framework-base@4328

@rivetkit/next-js

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/next-js@4328

@rivetkit/react

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/react@4328

rivetkit

pnpm add https://pkg.pr.new/rivet-dev/rivet/rivetkit@4328

@rivetkit/sql-loader

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sql-loader@4328

@rivetkit/sqlite-vfs

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/sqlite-vfs@4328

@rivetkit/traces

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/traces@4328

@rivetkit/workflow-engine

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/workflow-engine@4328

@rivetkit/virtual-websocket

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/virtual-websocket@4328

@rivetkit/engine-runner

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner@4328

@rivetkit/engine-runner-protocol

pnpm add https://pkg.pr.new/rivet-dev/rivet/@rivetkit/engine-runner-protocol@4328

commit: 5ea9e02

@MasterPtato MasterPtato mentioned this pull request Mar 2, 2026
11 tasks
@MasterPtato MasterPtato force-pushed the 02-27-fix_api_make_actor_destroy_wait_for_ack branch from ec5ffcb to c88c25b Compare March 3, 2026 00:06
@MasterPtato MasterPtato force-pushed the 02-27-fix_udb_add_txn_tagging branch from 011705e to 3472163 Compare March 3, 2026 00:06
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.

1 participant