You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/04/23 21:25:04 UTC

[GitHub] [hadoop-ozone] hanishakoneru commented on a change in pull request #855: HDDS-3474. Create transactionInfo Table in OmMetadataManager.

hanishakoneru commented on a change in pull request #855:
URL: https://github.com/apache/hadoop-ozone/pull/855#discussion_r414128556



##########
File path: hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneConsts.java
##########
@@ -329,4 +329,8 @@ private OzoneConsts() {
   public static final String GDPR_ALGORITHM = "algorithm";
 
 
+  // Transaction Info
+  public static final String TRANSACTION_INFO_KEY = "TRANSACTIONINFO";
+  public static final String TRANSACTION_INFO_SPLIT_KEY = "-";
+

Review comment:
       Question out of curiosity: In another patch (HDDS-3217), the Keys in DB are suffixed with a #. Is that a just convention followed for ContainerDBs or has any significance?

##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OMTransactionInfo.java
##########
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hadoop.ozone.om.ratis;
+
+import com.google.common.base.Preconditions;
+import org.apache.hadoop.ozone.OzoneConsts;
+
+/**
+ * TransactionInfo which is applied to OM DB.
+ */
+public class OMTransactionInfo {
+
+  private long currentTerm;
+  private long transactionIndex;

Review comment:
       Can we add a comment here that the transactionIndex corresponds to the Ratis Log Index. Would help if someone is trying to correlate this to Ratis snapshots.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org