You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/07/13 11:07:47 UTC

[GitHub] [incubator-doris] marising opened a new pull request #4086: [Feature][Meta]Update/Read/Write VisibleVersionTime for Partition#4076

marising opened a new pull request #4086:
URL: https://github.com/apache/incubator-doris/pull/4086


   #4076 
   1. The visibleVersionTime is updated when insert data to partition
   2. GlobalTransactionMgr call partition.updateVisibleVersionAndVersionHash(version, versionHash) when fe is restarted
   3. If fe restart, VisibleVersionTime may be changed, but the changed value is newer than the old value


----------------------------------------------------------------
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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on pull request #4086: [Feature][Meta]Update/Read/Write VisibleVersionTime for Partition#4076

Posted by GitBox <gi...@apache.org>.
morningman commented on pull request #4086:
URL: https://github.com/apache/incubator-doris/pull/4086#issuecomment-662543101


   Hi @marising the FE code structure has been changed, please rebase the code the solve the conflicts.


----------------------------------------------------------------
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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on a change in pull request #4086: [Feature][Meta]Update/Read/Write VisibleVersionTime for Partition#4076

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #4086:
URL: https://github.com/apache/incubator-doris/pull/4086#discussion_r455083866



##########
File path: fe/src/main/java/org/apache/doris/catalog/Partition.java
##########
@@ -344,6 +363,9 @@ public void write(DataOutput out) throws IOException {
         }
 
         out.writeLong(visibleVersion);
+        if (Catalog.getCurrentCatalogJournalVersion() >= FeMetaVersion.VERSION_88) {
+            out.writeLong(visibleVersionTime);

Review comment:
       If you do not persist the visibleVersionTime in edit log, than write it here is meaningless.

##########
File path: fe/src/main/java/org/apache/doris/catalog/Partition.java
##########
@@ -181,9 +182,27 @@ public long getVisibleVersion() {
         return visibleVersion;
     }
 
+    public long getVisibleVersionTime() {
+        return visibleVersionTime;
+    }
+
     public long getVisibleVersionHash() {
         return visibleVersionHash;
     }
+    
+    // The method updateVisibleVersionAndVersionHash is called when fe restart, the visibleVersionTime is updated
+    private void SetVisibleVersion(long visibleVersion, long visibleVersionHash){
+        this.visibleVersion = visibleVersion;
+        this.visibleVersionTime = System.currentTimeMillis();
+        this.visibleVersionHash = visibleVersionHash;
+    }
+
+    //Just for unit test
+    public void SetVisibleVersion(long visibleVersion, long visibleVersionHash, long visibleVersionTime){

Review comment:
       ```suggestion
       public void setVisibleVersion(long visibleVersion, long visibleVersionHash, long visibleVersionTime){
   ```

##########
File path: fe/src/main/java/org/apache/doris/catalog/Partition.java
##########
@@ -181,9 +182,27 @@ public long getVisibleVersion() {
         return visibleVersion;
     }
 
+    public long getVisibleVersionTime() {
+        return visibleVersionTime;
+    }
+
     public long getVisibleVersionHash() {
         return visibleVersionHash;
     }
+    
+    // The method updateVisibleVersionAndVersionHash is called when fe restart, the visibleVersionTime is updated
+    private void SetVisibleVersion(long visibleVersion, long visibleVersionHash){

Review comment:
       ```suggestion
       private void setVisibleVersion(long visibleVersion, long visibleVersionHash){
   ```




----------------------------------------------------------------
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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman merged pull request #4086: [Feature][Meta]Update/Read/Write VisibleVersionTime for Partition#4076

Posted by GitBox <gi...@apache.org>.
morningman merged pull request #4086:
URL: https://github.com/apache/incubator-doris/pull/4086


   


----------------------------------------------------------------
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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org