apache / apache/lucene

simulate disk fulls in copyBytes [LUCENE-2726]

Open
#3,800 4 comments 0 reactions 0 assignees View on GitHub
legacy-jira-fix-version:4.9 legacy-jira-fix-version:6.0 legacy-jira-priority:Major tool:build type:test
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

In #3711, i disabled copyBytes optimization (so it just calls writeBytes), but i mentioned there,
that I think it would be good to try to beef up tests if we ever wanted to have an optimization like this.

the problem was that when there was an index corruption bug, it was very difficult to detect with our tests.
So I think for safety, we should do this, even though its redundant with our current impl, since we look
for this in writeBytes.

---
Migrated from [LUCENE-2726](https://issues.apache.org/jira/browse/LUCENE-2726) by Robert Muir (@rmuir), updated May 09 2016
Attachments: [LUCENE-2726.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-2726/LUCENE-2726.patch)

Contributor guide

Open the contributing guide

Research direction

Start by reading the copyBytes and writeBytes implementations and the existing tests around them. Add coverage that simulates disk-full conditions during copying, then run the relevant Lucene tests and verify that corruption is detected reliably.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.