Implement PreferRepeatableRead by msullivan · Pull Request #609 · geldata/gel-python · GitHub
Skip to content

Implement PreferRepeatableRead#609

Merged
msullivan merged 3 commits into
masterfrom
auto-rr
Apr 23, 2025
Merged

Implement PreferRepeatableRead#609
msullivan merged 3 commits into
masterfrom
auto-rr

Conversation

@msullivan

Copy link
Copy Markdown
Member

COMMENTS NEEDED: We may want to reconsider the interface the user uses
to specify it!
Currently it works by setting default_transaction_isolation to the
enum value PreferRepeatableRead.

If that is set, the parse and execute paths will strip it from the
state that is sent, and then potentially inject RepeatableRead as the
value when doing execute, if it is safe.

@msullivan msullivan requested review from 1st1, elprans and fantix April 14, 2025 23:25
@msullivan msullivan force-pushed the auto-rr branch 2 times, most recently from 2b918de to 7a176d0 Compare April 15, 2025 00:06
@1st1

1st1 commented Apr 15, 2025

Copy link
Copy Markdown
Member

@elprans

elprans commented Apr 15, 2025

Copy link
Copy Markdown
Member

COMMENTS NEEDED: We may want to reconsider the interface the user uses to specify it! Currently it works by setting default_transaction_isolation to the enum value PreferRepeatableRead.

One danger of adding the enum value is possible confusion that it's a setting that the server supports (but this is minor since we'll add this server-side in 7).

Interface-wise, we should make with_transaction_options apply to implicit transactions as well.

@msullivan

Copy link
Copy Markdown
Member Author

Interface-wise, we should make with_transaction_options apply to implicit transactions as well.

I'm not sold on that exactly. What would be the interaction with explicitly setting the config values?

@elprans

elprans commented Apr 17, 2025

Copy link
Copy Markdown
Member

Interface-wise, we should make with_transaction_options apply to implicit transactions as well.

I'm not sold on that exactly. What would be the interaction with explicitly setting the config values?

with_transaction_options will override the config settings, which makes sense because it's an even more "granular" scope than a session.

@msullivan

Copy link
Copy Markdown
Member Author

Interface-wise, we should make with_transaction_options apply to implicit transactions as well.

I'm not sold on that exactly. What would be the interaction with explicitly setting the config values?

with_transaction_options will override the config settings, which makes sense because it's an even more "granular" scope than a session.

That's plausible, but we'll have to make them default to None instead of actual values, but that's doable

@msullivan msullivan changed the base branch from master to optional-tx-isolation-2 April 23, 2025 00:13
@msullivan msullivan force-pushed the optional-tx-isolation-2 branch 2 times, most recently from 213dc8a to 1ffc527 Compare April 23, 2025 00:55
Base automatically changed from optional-tx-isolation-2 to master April 23, 2025 02:17
COMMENTS NEEDED: We may want to reconsider the interface the user uses
to specify it!
Currently it works by setting default_transaction_isolation to the
enum value PreferRepeatableRead.

If that is set, the parse and execute paths will strip it from the
state that is sent, and then potentially inject RepeatableRead as the
value when doing execute, if it is safe.
I am actually still -0 on this, though.
@msullivan

Copy link
Copy Markdown
Member Author

Alright I think this is done, now?

@msullivan msullivan merged commit 46dae11 into master Apr 23, 2025
@msullivan msullivan deleted the auto-rr branch April 23, 2025 19:08
@msullivan

msullivan commented Apr 23, 2025

Copy link
Copy Markdown
Member Author

msullivan added a commit that referenced this pull request Apr 29, 2025
Changes
=======

* Enable reflecting of `ext` types.
  (by @vpetrovykh in 80a6b52)

* Enable multiple modules for SQLModel reflection.
  (by @vpetrovykh in 8a7fdb5)

* Update SQLModel generator.
  (by @vpetrovykh in 1d1c937)

* Fix an issue with generating SQLModel with array props.
  (by @vpetrovykh in 2acffba)

* Add encode and decode for array of array.
  (by @dnwpark in cc10463 for #594)
* Improve nested array test skipping
  (by @elprans in 4dd19cb)

* Fix server binary detection in WSL
  (by @elprans in 0d60662 for #601)

* Drop Python 3.8 support
  (by @elprans in 1209adc for #600)

* Fix reused SSLContext ALPN bug
  (by @fantix in 8874060 for #602)

* Pin Django to ~5.1
  (by @msullivan in dff941e for #610)

* Make IsolationLevel enum values match the server names
  (by @msullivan in 7d2a401 for #611)

* Make TransactionOptions default to optional
  (by @msullivan in 553e3ce for #612)

* Implement PreferRepeatableRead, apply TransactionOptions to config state
  (by @msullivan in 46dae11 for #609)

* Support PreferRepeatableRead on explicit transactions by retrying
  (by @msullivan in e1e25c0 for #616)

* Make EnumValue support comparison to strings
  (by @msullivan in bb93ed7 for #615)

* Update AI RAG response parsing.
  (by @dnwpark in 9060b04 for #618)
@msullivan msullivan mentioned this pull request Apr 29, 2025
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.

3 participants