Skip to content

Commit

Permalink
Address reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmetmircik committed Apr 13, 2022
1 parent a0ee4e9 commit 87597a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Expand Up @@ -45,14 +45,14 @@ public class MapTransactionLogRecord implements TransactionLogRecord {
private UUID ownerUuid;
private Operation op;

private transient RemoteCallHook nearCachingHook = RemoteCallHook.EMPTY_HOOK;
private transient RemoteCallHook remoteCallHook = RemoteCallHook.EMPTY_HOOK;

public MapTransactionLogRecord() {
}

public MapTransactionLogRecord(String name, Data key, int partitionId,
Operation op, UUID ownerUuid, UUID transactionId,
@Nonnull RemoteCallHook nearCachingHook) {
@Nonnull RemoteCallHook remoteCallHook) {
this.name = name;
this.key = key;
if (!(op instanceof MapTxnOperation)) {
Expand All @@ -62,7 +62,7 @@ public MapTransactionLogRecord(String name, Data key, int partitionId,
this.ownerUuid = ownerUuid;
this.partitionId = partitionId;
this.transactionId = transactionId;
this.nearCachingHook = nearCachingHook;
this.remoteCallHook = remoteCallHook;
}

@Override
Expand All @@ -85,12 +85,12 @@ public Operation newCommitOperation() {

@Override
public void onCommitSuccess() {
nearCachingHook.onRemoteCallSuccess(op);
remoteCallHook.onRemoteCallSuccess(op);
}

@Override
public void onCommitFailure() {
nearCachingHook.onRemoteCallFailure();
remoteCallHook.onRemoteCallFailure();
}

@Override
Expand Down
Expand Up @@ -424,9 +424,7 @@ public void onRemoteCallFailure() {
}

protected void updateOpStats(Operation op, long startNanos) {
if (!statisticsEnabled) {
return;
}
assert statisticsEnabled;

incrementTxnOperationStats(op, localMapStats, startNanos);
}
Expand Down

0 comments on commit 87597a4

Please sign in to comment.