Skip to content

feat(conflict): Add MySQL backed target dictionary store - #852

Open
manjari25 wants to merge 1 commit into
manjari/tango-signature-store-mysqlfrom
manjari/tango-dictionary-store-mysql
Open

manjari25 wants to merge 1 commit into
manjari/tango-signature-store-mysqlfrom
manjari/tango-dictionary-store-mysql

Conversation

@manjari25

@manjari25 manjari25 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Why?

Signatures hold 64-bit hashes, not labels. To explain or debug a conflict, someone needs to map an ID back to the target label it stands for. This PR implements the DictionaryStore contract from the first PR in the stack on MySQL, as part of the package owned by the tango conflict extension.

What?

Everything is added under submitqueue/extension/conflict/tango/mysql:

  • Adds the target_dictionary table:
    • Primary key (queue, id), with no secondary index.
    • The label is a plain TEXT value column.
    • A row is written once and never updated.
  • Adds a queue-bound MySQL DictionaryStore:
    • Create returns storage.ErrAlreadyExists if the ID is already recorded, even with a different label, so the first label on a hash collision stays.
    • A label whose queue differs from the bound queue is rejected.
    • Get reports an unrecorded ID as found=false, not as an error.
  • Extends the integration suite from the previous PR with a dictionary test. It covers an ID with the high bit set (the unsigned column), a long label, a second label keeping the first, and queue isolation. Both stores now share one suite and one MySQL container, so the suite type is renamed.
  • The store is not added to the orchestrator Storage aggregate. Nothing constructs it yet.

Test Plan

./tool/bazel test //submitqueue/extension/conflict/tango/mysql:go_default_test
./tool/bazel test //test/integration/submitqueue/extension/conflict/tango/mysql/... --test_output=streamed
make check-gazelle
make check-mocks
make lint
CI

Issue

@manjari25
manjari25 requested review from a team and sbalabanov as code owners October 13, 2026 19:47
@manjari25
manjari25 marked this pull request as draft October 13, 2026 19:47
@manjari25
manjari25 force-pushed the manjari/tango-dictionary-store-mysql branch from 6146b94 to 9dc6b48 Compare October 14, 2026 02:11
@manjari25
manjari25 marked this pull request as ready for review October 14, 2026 18:10
@manjari25
manjari25 added this pull request to stack #872 October 14, 2026 21:02
@manjari25
manjari25 force-pushed the manjari/tango-dictionary-store-mysql branch from 9dc6b48 to 29d5822 Compare October 15, 2026 22:05
@manjari25 manjari25 changed the title feat(storage): Add MySQL backed target dictionary store feat(conflict): Add MySQL backed target dictionary store Oct 15, 2026

This branch has not been deployed

No deployments
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