Skip to content

Conversation

himkak
Copy link

@himkak himkak commented Aug 20, 2025

Description

For the WarmIndex if the file deletion (which is triggered as part of creating the compound file) fails, we handle in the similar way as is done in FSDriectory, by asking the localDirectory to delete the file. The localDirectory if it fails, already has the mechanism to handle this by maintaining the file's info in pendingDeletes. The pending deletes are taken care later by retriggering the deletes.

Related Issues

Resolves #19052

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link
Contributor

❌ Gradle check result for e7aedd6: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❌ Gradle check result for a2a96c9: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Himanshu Kakar added 2 commits August 22, 2025 14:13
… creating the compound file) fails, we handle in the similar way as is done in FSDriectory, by asking the localDirectory to delete the file. The localDirectory if it fails, already has the mechanism to handle this by maintaining the file's info in pendingDeletes. The pending deletes are taken care later by retriggering the deletes.

Signed-off-by: Himanshu Kakar <hkakar@microsoft.com>
Signed-off-by: Himanshu Kakar <hkakar@microsoft.com>
@himkak himkak force-pushed the himkak/warmIndexLocalFileDeletionFailure branch from a2a96c9 to 026e3cd Compare August 22, 2025 08:43
Copy link
Contributor

❌ Gradle check result for 026e3cd: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@rayshrey
Copy link
Contributor

rayshrey commented Sep 3, 2025

A few general comments:

  • Fix indentations (run spotlessApply and precommit checks)
  • Add UTs to simulate file deletion failure for Composite Directory
  • While AccessDeniedException can be a probable cause, let's try to investigate more on what other exceptions might result into this and categorise what all exceptions are safe to ignore and which are not.

Another point I am thinking is if these failures are so generic then why they haven't been caught in our UTs and ITs - we might need to check flakiness of these tests and whether they are running on WindowsFS systems or not.

fileCache.remove(blockFilePath);
}catch(Exception e){
if (e.getCause() instanceof AccessDeniedException) {
localDirectory.deleteFile(blockFile);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to add a debug log as well on this, might prove useful for understanding how frequent the deletions fail

try {
fileCache.remove(blockFilePath);
}catch(Exception e){
if (e.getCause() instanceof AccessDeniedException) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way we can catch a specific type of Exception in catch instead of getting the exception from cause and doing an instanceof check ?

We should avoid instanceof checks if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working _No response_
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Warm Index : CompositeDirectory : AccessDenied Exception during indexing doc
2 participants