-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Close cursor if it's opened by different tx #12546
Conversation
@awskii maybe we must
|
@AskAlexSharov from one side yes, it would be better to panic with info, but i had a small intention to reuse sharedDomains without closing and reopening (requires only to set up new aggtx) but this could end up badly. |
|
i found it useful while did commitment rebuilding. I am going to add panic as you said. |
this branch,
|
Cursor keeps instance of |
Previous panic you had was realted to issue that sometimes we use tx, sometimes pass SharedDomains as kv.Tx implementation. Previous idea was to check pointers to given tx implementations and if they're mismatching, panic. So they did: we queried |
For the check being active, hid it behind "ERIGON_AGG_ASSERTS=true" env |
So we keep cursor interface opened inside
DomainRoTx
. If we then create new tx and try to read with it fromDomainRoTx
, value will be fetched via previously opened cursor which is not expected behaviour.I set stupid fix for that but i assume there could be better solutions.