Read-only profiles on readers that do not keep the session flag

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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
aws, mysql, rust
Domain
database

Research direction

Start by reading the handling for read-only profiles and session flags, then trace how the client detects server read-only behavior and Aurora write forwarding. The issue names :session as the place to show the guarantee; inspect the related tests and add coverage for each case. Done means safe readers can open query sessions, the applicable guarantee is shown, and refusals report the server values.

Written by the indexing model from the issue text.

Description

enhancement
Need

Follow-up of #421. On a reader that does not keep the session's read-only flag (seen on an AWS Aurora MySQL reader: transaction_read_only reads 0 right after it is set, innodb_read_only = 1), a profile that is itself read-only still cannot open query sessions, because datarig only trusts the session flag.

Plan
  • Accept such a server as read-only only when the server itself refuses writes, which on Aurora also means write forwarding is off for the session; innodb_read_only alone is not enough, since a reader can forward writes to the writer.
  • Show which guarantee applies in :session.
  • A test for each case; until then the refusal names the values the server returned.
Dominant language
Rust
Stars
166
Forks
8
Avg merge
4h 24m
Merged PRs (30d)
291

Getting set up

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.

More from DokaDev/datarig

All issues in DokaDev/datarig

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.