tballison opened a new pull request, #16530:
URL: https://github.com/apache/lucene/pull/16530

   ### Description
   
   Follow-up to #16173 and implementation of the suggestion in #14985.
   
   #16173 changed `FilterDirectory#copyFrom` to delegate to the wrapped 
directory, which hid `FilterDirectory` subclasses that override `createOutput` 
for per-file bookkeeping (`TrackingTmpOutputDirectoryWrapper`, 
`MockDirectoryWrapper`, `NRTCachingDirectory`, `DirectIODirectory`, 
`ByteWritesTrackingDirectoryWrapper`).
   
   This PR:
   - Makes `Directory#copyFrom` abstract so implementations choose copy 
behavior explicitly. `BaseDirectory` provides the standard routing 
implementation via the new protected final `copyThroughCreateOutput` helper.
   - Routes `FilterDirectory#copyFrom` through `copyThroughCreateOutput`so 
`createOutput` bookkeeping applies to copied files. Subclasses that want an 
optimized copy (e.g. `HardlinkCopyDirectoryWrapper`) may override to delegate.
   - Adds required implementations: `CompoundDirectory` throws (read-only), 
`FileSwitchDirectory` routes to the owning sub-directory, 
`BaseMergePolicyTestCase` anonymous directory throws.
   - Fixes `TrackingTmpOutputDirectoryWrapper#copyFrom` failure cleanup to 
delete the temp file rather than the logical dest name.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to