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

   ### Description
   
   Backport to `branch_10x` of the non-breaking parts of #16530 (which itself 
follows up #16173). Opened ahead of the main merge to get CI on the 10x 
variant; happy to hold merging until #16530 lands.
   
   #16173 (backported to 10x in 148ee2fd742) 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`).
   
   Differences from #16530, since we can't break the API on 10x:
   
   - `Directory#copyFrom` keeps its concrete default implementation (no 
abstract method, no `copyThroughCreateOutput` helper). 
`FilterDirectory#copyFrom` routes through `super.copyFrom` — i.e. through 
`createOutput` — instead of delegating, with javadoc noting that subclasses 
wanting an optimized copy (e.g. `HardlinkCopyDirectoryWrapper`) may override to 
delegate.
   - The required implementations added on main (`CompoundDirectory`, 
`FileSwitchDirectory`, `BaseMergePolicyTestCase`) are unnecessary here and are 
omitted.
   - `TrackingTmpOutputDirectoryWrapper#copyFrom` failure cleanup uses 
`IOUtils.deleteFilesIgnoringExceptions` since 
`deleteFilesSuppressingExceptions` (#14633) is main-only.
   
   Same as #16530:
   
   - Fixes `TrackingTmpOutputDirectoryWrapper#copyFrom` failure cleanup to 
delete the temp file rather than the logical dest name.
   - Ports the tests: 
`TestFilterDirectory#testCopyFromRoutesThroughCreateOutput` (replaces 
`testCopyFromDelegates`), `TestTrackingTmpOutputDirectoryWrapper`, 
`TestByteWritesTrackingDirectoryWrapper#testCopyFromTracksBytes`, 
`TestDirectIODirectoryCopyFrom`.
   
   The CHANGES entry replaces the #16173 entry under 10.6.0 Bug Fixes since 
this reverts that behavior before it ships in a release.
   
   Made with [Cursor](https://cursor.com)


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