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 2021/04/13 12:41:25 UTC

[GitHub] [incubator-doris] xinghuayu007 opened a new pull request #5644: [Optimize]not need to deserialize twice

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


   ## Proposed changes
   
   Tablet meta checkpoint is a operation to serialize tablet meta data and stores it into RocksDB. It is a cpu-exhausted and memory-exhausted operation. The data size of some tablet is high as 2G. In `serialize` function, the data has been deserialize to check the result, therefore it is no need to deserialize again to check  the result in function `save`. In reality, checkpoint often causes OOM.
   
   
   ## Types of changes
   
   What types of changes does your code introduce to Doris?
   _Put an `x` in the boxes that apply_
   
   - [ ] Bugfix (non-breaking change which fixes an issue)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
   - [ ] Documentation Update (if none of the other choices apply)
   - [] Code refactor (Modify the code structure, format the code, etc...)
   
   ## Checklist
   
   _Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
   
   - [ ] I have created an issue on (Fix #ISSUE) and described the bug/feature there in detail
   - [x ] Compiling and unit tests pass locally with my changes
   - [ ] I have added tests that prove my fix is effective or that my feature works
   - [x] If these changes need document changes, I have updated the document
   - [x] Any dependent changes have been merged
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 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.

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] caiconghui edited a comment on pull request #5644: [Optimize]not need to deserialize twice

Posted by GitBox <gi...@apache.org>.
caiconghui edited a comment on pull request #5644:
URL: https://github.com/apache/incubator-doris/pull/5644#issuecomment-820017839


   > > `Deserialization` here may be necessary. To ensure the tablet meta that will be stored in rocksdb is no problem and can be deserialized successfully, so deserializing the `meta_binary` here before saving it into rocksdb.
   > > I think it may be not a good practice to remove this part of the code.
   > 
   > I'm confused if it is possible that `SerializeToString` successfully but `ParseFromString` failed, maybe there are some historical reason?
   
   I think it makes no sense to check that SerializeToString successfully but ParseFromString failed, because the next step is fatal error.  the result is the same as we store it to rocksdb and get it  then ParseFromString, finally fatal error.  what's more, until now, I could not see any fatal error like 'SerializeToString successfully but ParseFromString failed', may it is a bug in older version?
   
   I think  SerializeToString performance is very important ,which may affect many operations on tablet, like publish version etc.
   So,just need to do the simple thing to SerializeToString instead of  adding ParseFromString check which would may cause poor performance


-- 
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] acelyc111 commented on pull request #5644: [Optimize]not need to deserialize twice

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


   > `Deserialization` here may be necessary. To ensure the tablet meta that will be stored in rocksdb is no problem and can be deserialized successfully, so deserializing the `meta_binary` here before saving it into rocksdb.
   > I think it may be not a good practice to remove this part of the code.
   
   I'm confused if it is possible that `SerializeToString` successfully but `ParseFromString` failed, maybe there are some historical reason?


-- 
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] caiconghui commented on pull request #5644: [Optimize]not need to deserialize twice

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


   > > `Deserialization` here may be necessary. To ensure the tablet meta that will be stored in rocksdb is no problem and can be deserialized successfully, so deserializing the `meta_binary` here before saving it into rocksdb.
   > > I think it may be not a good practice to remove this part of the code.
   > 
   > I'm confused if it is possible that `SerializeToString` successfully but `ParseFromString` failed, maybe there are some historical reason?
   
   I think it make no sense to check that SerializeToString successfully but ParseFromString failed, because the next step is fatal error.  the result is the same as we store it to rocksdb and get it  then ParseFromString, finally fatal error.  what's more, until now, I could not see any fatal error like 'SerializeToString successfully but ParseFromString failed', may it is a bug in older version?
   
   I think  SerializeToString performance is very important ,which may affect many operations on tablet, like publish version etc.
   So,just need to do the simple thing to SerializeToString instead of  adding ParseFromString check which would may cause poor performance


-- 
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] yangzhg merged pull request #5644: [Optimize] Remove deserialize check for meta serialization serialization to improve performance

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


   


-- 
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] xinghuayu007 commented on pull request #5644: [Optimize]not need to deserialize twice

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


   > > > `Deserialization` here may be necessary. To ensure the tablet meta that will be stored in rocksdb is no problem and can be deserialized successfully, so deserializing the `meta_binary` here before saving it into rocksdb.
   > > > I think it may be not a good practice to remove this part of the code.
   > > 
   > > 
   > > I'm confused if it is possible that `SerializeToString` successfully but `ParseFromString` failed, maybe there are some historical reason?
   > 
   > I think it makes no sense to check that SerializeToString successfully but ParseFromString failed, because the next step is fatal error. the result is the same as we store it to rocksdb and get it then ParseFromString, finally fatal error. what's more, until now, I could not see any fatal error like 'SerializeToString successfully but ParseFromString failed', may it is a bug in older version?
   > 
   > I think SerializeToString performance is very important ,which may affect many operations on tablet, like publish version etc.
   > So,just need to do the simple thing to SerializeToString instead of adding ParseFromString check which would may cause poor performance
   
   agree!


-- 
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] xinghuayu007 commented on pull request #5644: [Optimize]not need to deserialize twice

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


   > `Deserialization` here may be necessary. To ensure the tablet meta that will be stored in rocksdb is no problem and can be deserialized successfully, so deserializing the `meta_binary` here before saving it into rocksdb.
   > I think it may be not a good practice to remove this part of the code.
   
   Yes, it is important. But it is no need to deserialize twice. In serialize() Function, it has been deserialized to check the result.


-- 
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] weizuo93 commented on pull request #5644: [Optimize]not need to deserialize twice

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


   > > `Deserialization` here may be necessary. To ensure the tablet meta that will be stored in rocksdb is no problem and can be deserialized successfully, so deserializing the `meta_binary` here before saving it into rocksdb.
   > > I think it may be not a good practice to remove this part of the code.
   > 
   > Yes, it is important. But it is no need to deserialize twice. In serialize() Function, it has been deserialized to check the result.
   
   Sorry, I ignored that deserialization has been verified in `serialize()`. It is OK for me.


-- 
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] weizuo93 commented on pull request #5644: [Optimize]not need to deserialize twice

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


   `Deserialization` here may be necessary. To ensure the tablet meta that will be stored in rocksdb is no problem and can be deserialized successfully, so deserializing the `meta_binary` here before saving it into rocksdb. 
   I think it may be not a good practice to remove this part of the 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.

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