Hey Luigi

> in order to have a replicable behavior upon log replay, I need to add the 
> timestamp into the log entry.
Could you please explain your use case a little more? What is the use of 
timestamp? Are you ordering the transactions based on this timestamp?

Regards
Lokesh

> On 03-Aug-2021, at 7:14 PM, Mercurio, Luigi (Coral Springs) 
> <[email protected]> wrote:
> 
> Hi all:
> 
> I am considering moving from Atomix to Ratis for one of our core components. 
> This is a state machine which handles time-sensitive data.
> 
> Alas, Ratis does not seem to have a virtual clock, so, in order to have a 
> replicable behavior upon log replay, I need to add the timestamp into the log 
> entry.
> 
> The problem is that I must create the timestamp inside 
> preAppendTransaction(). I cannot do that in startTransaction(), because this 
> leads to events being passed to applyTransaction() in random order, and not 
> in the order in which the timestamp where inserted into the logData.
> 
> But…. There is not way to update the TransactionContext’s logData into an 
> existing TransactionContext. Yes, I can create a new one and return it from 
> preAppendTransaction(), but this will just cause the entire call to fail, 
> because the server does not properly handle the newly returned 
> TransactionContext.
> 
> So, for now I have to resort to set the (private) caseData_ field by 
> reflection, and I’d rather avoid doing so. Any chance that you can allow 
> updating the logData in the StateMachineLogEntryProto? That would solve the 
> problem.
> 
> Or… even better…. Can you automatically associate a timestamp with the log 
> entries? That would be GREAT!
> 
> Luigi Mercurio
> Sr. Application Analyst
> FDR-New Arch Acceleration
> Office:  +1 954.851.0000
> 
> Fiserv
> 3975 NW 120th Avenue
> Coral Springs, Florida 33065
> United States
> 
> Register Today | Forum 2020 | June 
> 15–18<https://www.fiserv.com/en/lp/emailsignature.html>
> Fiserv<https://www.fiserv.com/index.aspx> | Join Our 
> Team<https://www.careers.fiserv.com/?utm_source=outlook&utm_medium=email&utm_campaign=signature>
>  | Twitter<https://twitter.com/fiserv> | 
> LinkedIn<https://www.linkedin.com/company/fiserv/> | 
> Facebook<https://www.facebook.com/Fiserv/>
> FORTUNE Magazine World's Most Admired Companies® 2014 | 2015 | 2016 | 2017 | 
> 2018 | 2019 | 2020
> © 2020 Fiserv Inc. or its affiliates. Fiserv is a registered trademark of 
> Fiserv Inc. Privacy 
> Policy<https://www.fiserv.com/en/about-fiserv/privacy-policy.html>
> © 2020 Fortune Media IP Limited. Used under license.
> 

Reply via email to