apache / apache/lucene

abort() method for IndexOutput [LUCENE-2818]

Open
#3,892 7 comments 0 reactions 0 assignees View on GitHub
legacy-jira-priority:Minor type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

I'd like to see abort() method on IndexOutput that silently (no exceptions) closes IO and then does silent papaDir.deleteFile(this.fileName()).
This will simplify a bunch of error recovery code for IndexWriter and friends, but constitutes an API backcompat break.

What do you think?

---
Migrated from [LUCENE-2818](https://issues.apache.org/jira/browse/LUCENE-2818) by Earwin Burrfoot, updated Dec 18 2010

Contributor guide

Open the contributing guide

Research direction

Start by reading IndexOutput and the IndexWriter error-recovery paths that the issue says would be simplified. Compare the proposed abort() behavior—silent IO close followed by silent deletion through papaDir.deleteFile(this.fileName())—with the API compatibility constraints; done means the behavior and backcompat decision are settled.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.