stoty commented on code in PR #1569:
URL: https://github.com/apache/phoenix/pull/1569#discussion_r1124272815


##########
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/BaseScannerRegionObserver.java:
##########
@@ -426,58 +421,39 @@ RegionScanner getWrappedScanner(final 
ObserverContext<RegionCoprocessorEnvironme
     public void 
preCompactScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store 
store,
                                              ScanType scanType, ScanOptions 
options, CompactionLifeCycleTracker tracker,
                                              CompactionRequest request) throws 
IOException {
-        Configuration conf = c.getEnvironment().getConfiguration();
-        if (isMaxLookbackTimeEnabled(conf)) {
-            setScanOptionsForFlushesAndCompactions(conf, options, store, 
scanType);
-        }
+        setScanOptionsForFlushesAndCompactions(options);
     }
 
     @Override
     public void 
preFlushScannerOpen(ObserverContext<RegionCoprocessorEnvironment> c, Store 
store,
                                                 ScanOptions options, 
FlushLifeCycleTracker tracker) throws IOException {
-        Configuration conf = c.getEnvironment().getConfiguration();
-        if (isMaxLookbackTimeEnabled(conf)) {
-            setScanOptionsForFlushesAndCompactions(conf, options, store, 
ScanType.COMPACT_RETAIN_DELETES);
-        }
+        setScanOptionsForFlushesAndCompactions(options);
     }
 
     @Override
     public void preMemStoreCompactionCompactScannerOpen(
-        ObserverContext<RegionCoprocessorEnvironment> c, Store store, 
ScanOptions options)
-        throws IOException {
-        Configuration conf = c.getEnvironment().getConfiguration();
-        if (isMaxLookbackTimeEnabled(conf)) {
-            MemoryCompactionPolicy inMemPolicy =
-                store.getColumnFamilyDescriptor().getInMemoryCompaction();
-            ScanType scanType;
-            //the eager and adaptive in-memory compaction policies can purge 
versions; the others
-            // can't. (Eager always does; adaptive sometimes does)
-            if (inMemPolicy.equals(MemoryCompactionPolicy.EAGER) ||
-                inMemPolicy.equals(MemoryCompactionPolicy.ADAPTIVE)) {
-                scanType = ScanType.COMPACT_DROP_DELETES;
-            } else {
-                scanType = ScanType.COMPACT_RETAIN_DELETES;
-            }
-            setScanOptionsForFlushesAndCompactions(conf, options, store, 
scanType);
-        }
+        ObserverContext<RegionCoprocessorEnvironment> c, Store store, 
ScanOptions options) {
+        setScanOptionsForFlushesAndCompactions(options);
+
     }
 
     @Override
     public void 
preStoreScannerOpen(ObserverContext<RegionCoprocessorEnvironment> ctx, Store 
store,
                                            ScanOptions options) throws 
IOException {
 
-        if (!storeFileScanDoesntNeedAlteration(options)) {
-            //PHOENIX-4277 -- When doing a point-in-time (SCN) Scan, HBase by 
default will hide
-            // mutations that happen before a delete marker. This overrides 
that behavior.
-            options.setMinVersions(options.getMinVersions());
-            KeepDeletedCells keepDeletedCells = KeepDeletedCells.TRUE;
-            if (store.getColumnFamilyDescriptor().getTimeToLive() != 
HConstants.FOREVER) {
-                keepDeletedCells = KeepDeletedCells.TTL;
-            }
-            options.setKeepDeletedCells(keepDeletedCells);
-        }
+        setScanOptionsForFlushesAndCompactions(options);
     }
 
+    @Override
+    public InternalScanner 
preCompact(ObserverContext<RegionCoprocessorEnvironment> c, Store store,

Review Comment:
   This disables the logic for the old indexing in 
UngroupedAggregateRegionObserver#preCompactScannerOpen .
   
   We should add the capability to disable delete processing fully in 
StoreCompactionScanner (or subclass it), and 
   move that logic to UngroupedAggregateRegionObserver#preCompact() to set  up 
the Scanner to never remove Deleted cells.



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