You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good day/night.
Continuing this old issue #5692 , I'd like to know if anybody has it running stable. The information about orleans transactions is quite a lack, can't even find some real-usage talks for this actually perfect technology.
I couldn't adopt Orleans Transactions back then, due to project tech-debt-limitations or some stuff. Now currently I am implementing it into a project that contains around of ~300k grains in production, mostly persistent ones, non-azure storage provider.
When migrating from IPersistentState to ITransactionalState I ran into issues, but those are solved already at the testing environment. I don't know if the github issues section is right for this, maybe I should join some chat.
The issues are the following:
[Proposal] Add an option to exclusively lock Transactional State #9898 - this one is a huge hit after migrating from IPersistentState. Currently solved by my comment in the issue linked. R-V-W model in large scale of grains fails here with PerformRead due to shared/exclusive lock. Other async work is done aside PerformUpdate.
There is actually no information how would transaction context behave when using stateless worker grains (with no state), e.g.: client calls a stateless grain, meanwhile this stateless grain processes some data and then calls a transactional grain. Partially solved by hints from Starting transactions from non-statelessworker grains throws lock timeout exception a lot #7393 . By long term testing, turns out to be that stateless worker grains best to have TransactionOption.Supported attribute parameter, this brings no time-out or broken lock exceptions.
Also, following the issue, I found out that every grain, even stateless that will participate in a transaction, must have Reentrant attribute. But due to the nature of processing, I had to use AsyncSerialExecutor in such stateless grains. My scenario is that a stateless grain firstly processes some data, and then can call a transactional grain. Due to reentrancy, I perform the work using AsyncSerialExecutor and when it's completed, I call my transactional grains. AsyncSerialExecutor is not documented anywhere in details, but that helped me, and I'd like to see more information about this.
tl;dr: silo client -> stateless grain processing, also may call some transactional grain -> the outcome is random: hangs or broken-lock using TransactionOption.CreateOrJoin/Join. TransactionOption.Supported is fine.
Currently using TransactionOption.Supported for stateless workers, TransactionOption.Join for transactional grains, but if it's an entry call, I use ITransactionClient.RunTransaction with TransactionOption.Create from the start. This is a bit weird, because if I just use TransactionOption.CreateOrJoin that brings me broken-lock or lock upgrade errors. Otherwise it works fine even in mid-load with no "random" lock errors.
For some reason, no matter the transaction storage provider, Store of ITransactionalStateStorage gets called each time when I try to read using PerformRead. Even if my transactional grain does no write at all, has ReadOnly attribute, I still get some activity in Store. I don't know if it is by design, or a bug.
But back to my main question: does anybody use orleans transactions in a high-load, production environment? If so, what issues you had? I'd really like to see some practical usage recommendations, not just for some small examples, but how you handled it, how it goes.
And my one cent, thank you for such great product, I love Orleans.
Good day/night.
Continuing this old issue #5692 , I'd like to know if anybody has it running stable. The information about orleans transactions is quite a lack, can't even find some real-usage talks for this actually perfect technology.
I couldn't adopt Orleans Transactions back then, due to project tech-debt-limitations or some stuff. Now currently I am implementing it into a project that contains around of ~300k grains in production, mostly persistent ones, non-azure storage provider.
When migrating from IPersistentState to ITransactionalState I ran into issues, but those are solved already at the testing environment. I don't know if the github issues section is right for this, maybe I should join some chat.
The issues are the following:
[Proposal] Add an option to exclusively lock Transactional State #9898 - this one is a huge hit after migrating from IPersistentState. Currently solved by my comment in the issue linked. R-V-W model in large scale of grains fails here with PerformRead due to shared/exclusive lock. Other async work is done aside PerformUpdate.
There is actually no information how would transaction context behave when using stateless worker grains (with no state), e.g.: client calls a stateless grain, meanwhile this stateless grain processes some data and then calls a transactional grain. Partially solved by hints from Starting transactions from non-statelessworker grains throws lock timeout exception a lot #7393 . By long term testing, turns out to be that stateless worker grains best to have TransactionOption.Supported attribute parameter, this brings no time-out or broken lock exceptions.
Also, following the issue, I found out that every grain, even stateless that will participate in a transaction, must have
Reentrantattribute. But due to the nature of processing, I had to useAsyncSerialExecutorin such stateless grains. My scenario is that a stateless grain firstly processes some data, and then can call a transactional grain. Due to reentrancy, I perform the work usingAsyncSerialExecutorand when it's completed, I call my transactional grains.AsyncSerialExecutoris not documented anywhere in details, but that helped me, and I'd like to see more information about this.tl;dr: silo client -> stateless grain processing, also may call some transactional grain -> the outcome is random: hangs or broken-lock using TransactionOption.CreateOrJoin/Join. TransactionOption.Supported is fine.
Currently using TransactionOption.Supported for stateless workers, TransactionOption.Join for transactional grains, but if it's an entry call, I use
ITransactionClient.RunTransactionwithTransactionOption.Createfrom the start. This is a bit weird, because if I just useTransactionOption.CreateOrJointhat brings me broken-lock or lock upgrade errors. Otherwise it works fine even in mid-load with no "random" lock errors.For some reason, no matter the transaction storage provider,
StoreofITransactionalStateStoragegets called each time when I try to read usingPerformRead. Even if my transactional grain does no write at all, hasReadOnlyattribute, I still get some activity inStore. I don't know if it is by design, or a bug.But back to my main question: does anybody use orleans transactions in a high-load, production environment? If so, what issues you had? I'd really like to see some practical usage recommendations, not just for some small examples, but how you handled it, how it goes.
And my one cent, thank you for such great product, I love Orleans.