You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/11/09 15:19:20 UTC

[GitHub] [pulsar] codelipenghui opened a new pull request #12698: Fix lost compaction data due to compaction properties missed during reset-cursor

codelipenghui opened a new pull request #12698:
URL: https://github.com/apache/pulsar/pull/12698


   ### Motivation
   
   Fix lost compaction data due to compaction properties missed during reset-cursor.
   
   1. The compaction reader will seek to the earliest position to read data from the topic, but the compaction properties missed during the cursor reset, this will lead to the inited compaction subscribe without compaction horizon, so the compaction reader will skip the last compacted data. It will only happen when init the compaction subscription, so can introduced by the loadbalance or topic unloading manually.
   
   2. Advance the cursor should also keep the properties, otherwise, the properties will lost during the cursor trimming.
   
   ### Changes
   
   1. Keep the properties for resetting the cursor while the cursor is for data compaction.
   2. Copy the properties to the new mark delete entry while advance the cursor, this is triggered byt the managed ledger internal, so it's not only for compacted topic, the internal task should not loss the properties when trimming the cursor.
   
   ### Tests
   
   New tests added to make sure the compaction will not loss data during topic unloading and the reader can read all the compacted data after the compaction task complete
   
   ### Documentation
   
   Check the box below and label this PR (if you have committer privilege).
   
   Need to update docs? 
   
   - [ ] `doc-required` 
     
     (If you need help on updating docs, create a doc issue)
     
   - [x] `no-need-doc` 
     
     (Please explain why)
     
   - [ ] `doc` 
     
     (If this PR contains doc changes)
   
   
   


-- 
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@pulsar.apache.org

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



[GitHub] [pulsar] codelipenghui merged pull request #12698: Fix lost compaction data due to compaction properties missed during reset-cursor

Posted by GitBox <gi...@apache.org>.
codelipenghui merged pull request #12698:
URL: https://github.com/apache/pulsar/pull/12698


   


-- 
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@pulsar.apache.org

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