[ https://issues.apache.org/jira/browse/RATIS-2094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Duong updated RATIS-2094: ------------------------- Description: In RATIS-2020, we've changed access to LogEntry in TransactionContext to either via reference count (refer to the original zero-copy message) or copying (for backward compatibility). However, the same thing is not done for log entry derived data (data extracted from the original log entry or original message) like "stateMachineLogEntry" or even "getStateMachineContext". This allows StateMachine to use zero-copy data without obtaining a reference count or copying to decouple, hence corruption possibility. We should deprecate the getStateMachineLogEntry and getStateMachineContext and provide access via the reference counter instead. was: In RATIS-2020, we've changed access to LogEntry in TransactionContext to either via reference count (refer to the original zero-copy message) or copying (for backward compatible). However, the same thing is not done for log entry derived data (data extracted from the original log entry or original message) like "stateMachineLogEntry" or even "getStateMachineContext". This allows StateMachine to use zero-copy data without obtaining a reference count or copying to decouple, hence corruption posibility. We should deprecate the getStateMachineLogEntry and getStateMachineContext and provide access via referent counter instead. > TransactionContext's stateMachineLogEntry is obtained without reference > counter or copying > ------------------------------------------------------------------------------------------ > > Key: RATIS-2094 > URL: https://issues.apache.org/jira/browse/RATIS-2094 > Project: Ratis > Issue Type: Sub-task > Reporter: Duong > Priority: Major > > In RATIS-2020, we've changed access to LogEntry in TransactionContext to > either via reference count (refer to the original zero-copy message) or > copying (for backward compatibility). > However, the same thing is not done for log entry derived data (data > extracted from the original log entry or original message) like > "stateMachineLogEntry" or even "getStateMachineContext". This allows > StateMachine to use zero-copy data without obtaining a reference count or > copying to decouple, hence corruption possibility. > We should deprecate the getStateMachineLogEntry and getStateMachineContext > and provide access via the reference counter instead. -- This message was sent by Atlassian Jira (v8.20.10#820010)