lhotari opened a new pull request, #23311:
URL: https://github.com/apache/pulsar/pull/23311

   ## Motivation
   
   This PR is part of an initiative to clean up and decouple the ManagedLedger 
interfaces from their current implementation in preparation for Pulsar 4.0. The 
primary goals are:
   
   1. To allow for alternative ManagedLedger implementations in Pulsar 4.0.
   2. To improve the overall architecture by reducing coupling between core 
Pulsar components and specific ManagedLedger implementations.
   
   This work stems from a community discussion on the Apache Pulsar mailing 
list: [Preparing for Pulsar 4.0: cleaning up the Managed Ledger 
interfaces](https://lists.apache.org/thread/b2f4vkql693x3frdxm75tndk686crh9k)
   
   Since the ManagedLedger interface is not exposed externally and this PR 
doesn't introduce implementation changes, a formal PIP (Pulsar Improvement 
Proposal) is not required. The mailing list discussion and the review process 
for this PR are considered sufficient for proceeding with these changes.
   
   ## Scope
   
   This PR aims to make minimal, focused changes to achieve the decoupling 
goal. It does not include:
   - Adding comprehensive JavaDocs to the interfaces (this will be addressed in 
future PRs)
   - Changing any external APIs or behaviors
   
   ## Modifications
   
   1. **Decouple from `ManagedLedgerImpl`:**
      - Add required methods from `ManagedLedgerImpl` to the `ManagedLedger` 
interface
      - Update relevant code to use the interface instead of the implementation
   
   2. **Decouple from `ManagedLedgerFactoryImpl`:**
      - Add necessary methods from `ManagedLedgerFactoryImpl` to the 
`ManagedLedgerFactory` interface
      - Refactor code to depend on the interface rather than the concrete 
implementation
   
   3. **Decouple from `ManagedCursorImpl`:**
      - Enhance the `ManagedCursor` interface with required methods from 
`ManagedCursorImpl`
      - Update code to use the interface methods instead of 
implementation-specific ones
   
   4. **Introduce `ReadOnlyManagedLedger` interface:**
      - Extract this interface to decouple from `ReadOnlyManagedLedgerImpl`
      - Adjust code to utilize the new interface where appropriate
   
   5. **Additional minor changes:**
      - Adjust method signatures and parameter types as needed
      - Refactor any code that directly referenced implementation classes
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to