datafuselabs / databend

𝗗𝗮𝘁𝗮, 𝗔𝗻𝗮𝗹𝘆𝘁𝗶𝗰𝘀 & 𝗔𝗜. Modern alternative to Snowflake. Cost-effective and simple for massive-scale analytics. https://databend.com
https://docs.databend.com
Other
7.67k stars 727 forks source link

tracking: http handler txn support. #14789

Open youngsofun opened 6 months ago

youngsofun commented 6 months ago

Summary

make sure:

steps:

youngsofun commented 6 months ago

for the .session, it is better for clients to decode and save it as JSON Ast instead of struct, and send to server as it is in next query. if some field is needed by the client, decode and get them separately. 2 advantages

  1. not compatibility issue when new field is added to the session state
  2. some field is that client do not care can be ignored when decoding to struct.

I will try this later

hantmac commented 6 months ago
  • old server: user get error when exec Begin
  • old client + new server: Begin/ commit / rollback may success, but txn is not working,

    • client may need to send version or capability to resolve this?

for the .session, it is better for clients to decode and save it as JSON Ast instead of struct, and send to server as it is in next query. if some field is needed by the client, decode and get them separately. 2 advantages

  1. not compatibility issue when new field is added to the session state
  2. some field is that client do not care can be ignored when decoding to struct.

I will try this later

@youngsofun Which API need client call when Begin, commit, and rollback? Or use specified SQL ?

youngsofun commented 6 months ago

@hantmac use specified SQL