Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ public final class OmUtils {
public static final long EPOCH_ID_SHIFT = 62; // 64 - 2
public static final long REVERSE_EPOCH_ID_SHIFT = 2; // 64 - EPOCH_ID_SHIFT
public static final long MAX_TRXN_ID = (1L << 54) - 2;
public static final int EPOCH_WHEN_RATIS_NOT_ENABLED = 1;
public static final int EPOCH_WHEN_RATIS_ENABLED = 2;

private OmUtils() {
Expand Down Expand Up @@ -601,9 +600,8 @@ public static long getOMClientRpcTimeOut(ConfigurationSource configuration) {
return configuration.getObject(OMClientConfig.class).getRpcTimeOut();
}

public static int getOMEpoch(boolean isRatisEnabled) {
return isRatisEnabled ? EPOCH_WHEN_RATIS_ENABLED :
EPOCH_WHEN_RATIS_NOT_ENABLED;
public static int getOMEpoch() {
return EPOCH_WHEN_RATIS_ENABLED;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ public void testUnknownRequestHandling()

OzoneManagerProtocolServerSideTranslatorPB serverSideTranslatorPB =
new OzoneManagerProtocolServerSideTranslatorPB(ozoneManager,
ratisServer, protocolMessageMetrics, true,
100L);
ratisServer, protocolMessageMetrics, 100L);

OzoneManagerProtocolProtos.OMResponse actualResponse =
serverSideTranslatorPB.processRequest(omRequest);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ public class OmMetadataManagerImpl implements OMMetadataManager,
private Table snapshotRenamedTable;
private Table compactionLogTable;

private boolean isRatisEnabled;
private boolean ignorePipelineinKey;
private Table deletedDirTable;

Expand Down Expand Up @@ -351,8 +350,7 @@ public OmMetadataManagerImpl(OzoneConfiguration conf,
this.ozoneManager = ozoneManager;
this.perfMetrics = perfMetrics;
this.lock = new OzoneManagerLock(conf);
isRatisEnabled = true;
this.omEpoch = OmUtils.getOMEpoch(isRatisEnabled);
this.omEpoch = OmUtils.getOMEpoch();
// For test purpose only
ignorePipelineinKey = conf.getBoolean(
"ozone.om.ignore.pipeline", Boolean.TRUE);
Expand Down Expand Up @@ -567,11 +565,6 @@ public void start(OzoneConfiguration configuration) throws IOException {
// enabled, ratis log provides us this guaranty. This check is needed
// until HA code path becomes default in OM.

// When ratis is not enabled override and set the sync.
if (!isRatisEnabled) {
rocksDBConfiguration.setSyncOption(true);
}

int maxOpenFiles = configuration.getInt(OZONE_OM_DB_MAX_OPEN_FILES,
OZONE_OM_DB_MAX_OPEN_FILES_DEFAULT);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,7 @@ public OmSnapshot load(@Nonnull UUID snapshotId) throws IOException {
try {
// create the other manager instances based on snapshot
// metadataManager
PrefixManagerImpl pm = new PrefixManagerImpl(ozoneManager, snapshotMetadataManager,
false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isRatisEnabled = false

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, restored.

PrefixManagerImpl pm = new PrefixManagerImpl(ozoneManager, snapshotMetadataManager);
KeyManagerImpl km = new KeyManagerImpl(ozoneManager,
ozoneManager.getScmClient(), snapshotMetadataManager, conf,
ozoneManager.getBlockTokenSecretManager(),
Expand Down
Loading