Ivan Zlenko created IGNITE-28333:
------------------------------------

             Summary: Extract simple and direct RO handlers from 
PartitionReplicaListener if-else chain
                 Key: IGNITE-28333
                 URL: https://issues.apache.org/jira/browse/IGNITE-28333
             Project: Ignite
          Issue Type: Improvement
          Components: replicated zones ai3
            Reporter: Ivan Zlenko
            Assignee: Ivan Zlenko


This is the next increment of the 
PartitionReplicaListener.processOperationRequest refactoring 
([IGNITE-28293|https://issues.apache.org/jira/browse/IGNITE-28293]).            
                                                
   
The first increment introduced the handler registry pattern 
(ReplicaRequestHandlers) and extracted 2 handlers 
(BuildIndexReplicaRequestHandler, ScanCloseRequestHandler). This increment 
extracts 4 more handlers that fit cleanly into the existing interfaces.         
                                                                                
                                                                                
               
                                                                                
                                                                                
                                                                 
Simple handlers (use ReplicaRequestHandler, no extra context needed):           
                                                                                
                                                             
  TableWriteIntentSwitchReplicaRequest → extract from 
processTableWriteIntentSwitchAction
                                                                                
                                                                                
                                                                 
  TxStatePrimaryReplicaRequest → extract from 
processTxStatePrimaryReplicaRequest
                                                                                
                                                                                
                                                                 
  Direct RO handlers (use ReadOnlyReplicaRequestHandler):                       
                                                                                
                                                               
  ReadOnlyDirectSingleRowReplicaRequest → extract from 
processReadOnlyDirectSingleEntryAction                                          
                                                                                
          
                                                                                
                                                                                
                                                                 
  ReadOnlyDirectMultiRowReplicaRequest → extract from 
processReadOnlyDirectMultiEntryAction
                                                                                
                                                                                
                                                                 
  After this, 9 handlers will remain in the if-else chain (6 RW + 3 RO 
non-direct), which requires additional context (leaseStartTime, isPrimary) 
passed through to the handler.                                                  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to