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 2022/05/05 09:35:32 UTC

[GitHub] [incubator-doris] xinyiZzz opened a new pull request, #9379: [fix][compaction] Rowset::end_version null pointer

xinyiZzz opened a new pull request, #9379:
URL: https://github.com/apache/incubator-doris/pull/9379

   # Proposed changes
   
   Issue Number: close #9371
   
   ## Problem Summary:
   
   Describe the overview of changes.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (Yes/No/I Don't know)
   2. Has unit tests been added: (Yes/No/No Need)
   3. Has document been added or modified: (Yes/No/No Need)
   4. Does it need to update dependencies: (Yes/No)
   5. Are there any changes that cannot be rolled back: (Yes/No)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   


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

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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] xinyiZzz commented on a diff in pull request #9379: [fix][compaction] Rowset::end_version null pointer

Posted by GitBox <gi...@apache.org>.
xinyiZzz commented on code in PR #9379:
URL: https://github.com/apache/incubator-doris/pull/9379#discussion_r865745858


##########
be/src/olap/compaction.cpp:
##########
@@ -136,7 +136,12 @@ Status Compaction::do_compaction_impl(int64_t permits) {
     int64_t current_max_version;
     {
         std::shared_lock rdlock(_tablet->get_header_lock());
-        current_max_version = _tablet->rowset_with_max_version()->end_version();

Review Comment:
   > 1. The tablet should not have rowset because when the table is created BE will add 0-1 rowset to the tablet.
   > 2. I think we should be careful with this case... Maybe should deep dive some code.
   
   I agree, these two cases are not normal, maybe the tablet was deleted during compaction, or invalid?
   
   At present this is the previous solution, there may be a better way.



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

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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] yiguolei commented on a diff in pull request #9379: [fix][compaction] Rowset::end_version null pointer

Posted by GitBox <gi...@apache.org>.
yiguolei commented on code in PR #9379:
URL: https://github.com/apache/incubator-doris/pull/9379#discussion_r865726924


##########
be/src/olap/compaction.cpp:
##########
@@ -136,7 +136,12 @@ Status Compaction::do_compaction_impl(int64_t permits) {
     int64_t current_max_version;
     {
         std::shared_lock rdlock(_tablet->get_header_lock());
-        current_max_version = _tablet->rowset_with_max_version()->end_version();

Review Comment:
   when will rowset_with_max_version == nullptr?



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

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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] yiguolei commented on a diff in pull request #9379: [fix][compaction] Rowset::end_version null pointer

Posted by GitBox <gi...@apache.org>.
yiguolei commented on code in PR #9379:
URL: https://github.com/apache/incubator-doris/pull/9379#discussion_r865740144


##########
be/src/olap/compaction.cpp:
##########
@@ -136,7 +136,12 @@ Status Compaction::do_compaction_impl(int64_t permits) {
     int64_t current_max_version;
     {
         std::shared_lock rdlock(_tablet->get_header_lock());
-        current_max_version = _tablet->rowset_with_max_version()->end_version();

Review Comment:
   1. The tablet should not have rowset because when the table is created BE will add 0-1 rowset to the tablet.
   2. I think we should be careful with this case... Maybe should deep dive some code.



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

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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] xinyiZzz commented on a diff in pull request #9379: [fix][compaction] Rowset::end_version null pointer

Posted by GitBox <gi...@apache.org>.
xinyiZzz commented on code in PR #9379:
URL: https://github.com/apache/incubator-doris/pull/9379#discussion_r865737746


##########
be/src/olap/compaction.cpp:
##########
@@ -136,7 +136,12 @@ Status Compaction::do_compaction_impl(int64_t permits) {
     int64_t current_max_version;
     {
         std::shared_lock rdlock(_tablet->get_header_lock());
-        current_max_version = _tablet->rowset_with_max_version()->end_version();

Review Comment:
   This seems to happen in two cases:
   1. The tablet has no rowset.
   2. The version of max version rowset no longer exists in the tablet.
   
   In fact, I did not carefully analyze why it occurs. Because other `tablet->rowset_with_max_version()` all compare whether the return value is null, so I also compare here :)



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

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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] github-actions[bot] commented on pull request #9379: [fix][compaction] Rowset::end_version null pointer

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #9379:
URL: https://github.com/apache/incubator-doris/pull/9379#issuecomment-1119305136

   PR approved by anyone and no changes requested.


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

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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] xinyiZzz commented on a diff in pull request #9379: [fix][compaction] Rowset::end_version null pointer

Posted by GitBox <gi...@apache.org>.
xinyiZzz commented on code in PR #9379:
URL: https://github.com/apache/incubator-doris/pull/9379#discussion_r865737746


##########
be/src/olap/compaction.cpp:
##########
@@ -136,7 +136,12 @@ Status Compaction::do_compaction_impl(int64_t permits) {
     int64_t current_max_version;
     {
         std::shared_lock rdlock(_tablet->get_header_lock());
-        current_max_version = _tablet->rowset_with_max_version()->end_version();

Review Comment:
   This seems to happen in two cases:
   1. The tablet has no rowset.
   2. The version of max version rowset no longer exists in the tablet.
   
   In fact, I did not carefully analyze why it occurs. Because other `tablet->rowset_with_max_version()` all compare whether the return value is null, so I also compare here : )
   
   And here `current_max_version` is only used to print the log, it will not affect the execution.



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

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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] yiguolei merged pull request #9379: [fix][compaction] Rowset::end_version null pointer

Posted by GitBox <gi...@apache.org>.
yiguolei merged PR #9379:
URL: https://github.com/apache/incubator-doris/pull/9379


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

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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