You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "JiangHua Zhu (Jira)" <ji...@apache.org> on 2024/10/03 08:31:00 UTC

[jira] [Created] (RATIS-2167) Add default value in TermIndex

JiangHua Zhu created RATIS-2167:
-----------------------------------

             Summary: Add default value in TermIndex
                 Key: RATIS-2167
                 URL: https://issues.apache.org/jira/browse/RATIS-2167
             Project: Ratis
          Issue Type: Improvement
          Components: server
    Affects Versions: 3.1.0
            Reporter: JiangHua Zhu


The default value of TermIndex is used in some places.
BaseStateMachine class:
{code:java}
  public BaseStateMachine() {
    setLastAppliedTermIndex(TermIndex.valueOf(0, -1));
  }
{code}

In the Ozone project, TransactionInfo:
{code:java}
public static final TransactionInfo DEFAULT_VALUE = valueOf(0, -1);
{code}

They all use a common default value, TermIndex.valueOf(0,-1).
We can build this unified default value into TermIndex.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)