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/02/17 05:31:38 UTC

[GitHub] [incubator-doris] wangbo opened a new pull request #2922: AlterJobV2 Pending Status Replay Fix Bug

wangbo opened a new pull request #2922: AlterJobV2 Pending Status Replay Fix Bug
URL: https://github.com/apache/incubator-doris/pull/2922
 
 
   #2920

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] wangbo commented on a change in pull request #2922: AlterJobV2 Pending Status Replay Fix Bug

Posted by GitBox <gi...@apache.org>.
wangbo commented on a change in pull request #2922: AlterJobV2 Pending Status Replay Fix Bug
URL: https://github.com/apache/incubator-doris/pull/2922#discussion_r380016645
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/catalog/Catalog.java
 ##########
 @@ -1702,8 +1702,18 @@ public long loadAlterJob(DataInputStream dis, long checksum, JobType type) throw
             newChecksum ^= size;
             for (int i = 0; i < size; i++) {
                 AlterJobV2 alterJobV2 = AlterJobV2.read(dis);
-                if (type == JobType.ROLLUP) {
-                    this.getRollupHandler().addAlterJobV2(alterJobV2);
+                if (type == JobType.ROLLUP || type == JobType.SCHEMA_CHANGE) {
+                    if (type == JobType.ROLLUP)
 
 Review comment:
   👌

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] wangbo commented on a change in pull request #2922: AlterJobV2 Pending Status Replay Fix Bug

Posted by GitBox <gi...@apache.org>.
wangbo commented on a change in pull request #2922: AlterJobV2 Pending Status Replay Fix Bug
URL: https://github.com/apache/incubator-doris/pull/2922#discussion_r380016716
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/catalog/Catalog.java
 ##########
 @@ -1702,8 +1702,18 @@ public long loadAlterJob(DataInputStream dis, long checksum, JobType type) throw
             newChecksum ^= size;
             for (int i = 0; i < size; i++) {
                 AlterJobV2 alterJobV2 = AlterJobV2.read(dis);
-                if (type == JobType.ROLLUP) {
-                    this.getRollupHandler().addAlterJobV2(alterJobV2);
+                if (type == JobType.ROLLUP || type == JobType.SCHEMA_CHANGE) {
+                    if (type == JobType.ROLLUP)
+                        this.getRollupHandler().addAlterJobV2(alterJobV2);
+                    else
+                        alterJobsV2.put(alterJobV2.getJobId(), alterJobV2);
+                    // ATTN : we just want to add tablet into TabletInvertedIndex when only PendingJob is checkpointed
+                    // to prevent TabletInvertedIndex data loss,
+                    // So just use AlterJob.replay() instead of AlterHandler.replay().
+                    if (alterJobV2.getJobState() == AlterJobV2.JobState.PENDING) {
+                        alterJobV2.replay(alterJobV2);
+                        LOG.warn("replay pending alter job when load alter job {} ", alterJobV2.getJobId());
 
 Review comment:
   👌

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] kangkaisen commented on a change in pull request #2922: AlterJobV2 Pending Status Replay Fix Bug

Posted by GitBox <gi...@apache.org>.
kangkaisen commented on a change in pull request #2922: AlterJobV2 Pending Status Replay Fix Bug
URL: https://github.com/apache/incubator-doris/pull/2922#discussion_r379997934
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/catalog/Catalog.java
 ##########
 @@ -1702,8 +1702,18 @@ public long loadAlterJob(DataInputStream dis, long checksum, JobType type) throw
             newChecksum ^= size;
             for (int i = 0; i < size; i++) {
                 AlterJobV2 alterJobV2 = AlterJobV2.read(dis);
-                if (type == JobType.ROLLUP) {
-                    this.getRollupHandler().addAlterJobV2(alterJobV2);
+                if (type == JobType.ROLLUP || type == JobType.SCHEMA_CHANGE) {
+                    if (type == JobType.ROLLUP)
 
 Review comment:
   code style. Add {} to if else.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] kangkaisen commented on a change in pull request #2922: AlterJobV2 Pending Status Replay Fix Bug

Posted by GitBox <gi...@apache.org>.
kangkaisen commented on a change in pull request #2922: AlterJobV2 Pending Status Replay Fix Bug
URL: https://github.com/apache/incubator-doris/pull/2922#discussion_r379998028
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/catalog/Catalog.java
 ##########
 @@ -1702,8 +1702,18 @@ public long loadAlterJob(DataInputStream dis, long checksum, JobType type) throw
             newChecksum ^= size;
             for (int i = 0; i < size; i++) {
                 AlterJobV2 alterJobV2 = AlterJobV2.read(dis);
-                if (type == JobType.ROLLUP) {
-                    this.getRollupHandler().addAlterJobV2(alterJobV2);
+                if (type == JobType.ROLLUP || type == JobType.SCHEMA_CHANGE) {
+                    if (type == JobType.ROLLUP)
+                        this.getRollupHandler().addAlterJobV2(alterJobV2);
+                    else
+                        alterJobsV2.put(alterJobV2.getJobId(), alterJobV2);
+                    // ATTN : we just want to add tablet into TabletInvertedIndex when only PendingJob is checkpointed
+                    // to prevent TabletInvertedIndex data loss,
+                    // So just use AlterJob.replay() instead of AlterHandler.replay().
+                    if (alterJobV2.getJobState() == AlterJobV2.JobState.PENDING) {
+                        alterJobV2.replay(alterJobV2);
+                        LOG.warn("replay pending alter job when load alter job {} ", alterJobV2.getJobId());
 
 Review comment:
   info is enough.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #2922: AlterJobV2 Pending Status Replay Fix Bug

Posted by GitBox <gi...@apache.org>.
morningman merged pull request #2922: AlterJobV2 Pending Status Replay Fix Bug
URL: https://github.com/apache/incubator-doris/pull/2922
 
 
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org