mirror of https://github.com/apache/lucene.git
Partial revert of r1479766 (http://svn.apache.org/viewvc?view=revision&revision=1479766).
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1484146 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
927308b528
commit
c7d7eae2ae
|
@ -55,14 +55,14 @@ public class MockIndexOutputWrapper extends IndexOutput {
|
||||||
long realUsage = 0;
|
long realUsage = 0;
|
||||||
|
|
||||||
// Enforce disk full:
|
// Enforce disk full:
|
||||||
if (dir.maxSize != 0 && freeSpace < len) {
|
if (dir.maxSize != 0 && freeSpace <= len) {
|
||||||
// Compute the real disk free. This will greatly slow
|
// Compute the real disk free. This will greatly slow
|
||||||
// down our test but makes it more accurate:
|
// down our test but makes it more accurate:
|
||||||
realUsage = dir.getRecomputedActualSizeInBytes();
|
realUsage = dir.getRecomputedActualSizeInBytes();
|
||||||
freeSpace = dir.maxSize - realUsage;
|
freeSpace = dir.maxSize - realUsage;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dir.maxSize != 0 && freeSpace < len) {
|
if (dir.maxSize != 0 && freeSpace <= len) {
|
||||||
if (freeSpace > 0) {
|
if (freeSpace > 0) {
|
||||||
realUsage += freeSpace;
|
realUsage += freeSpace;
|
||||||
if (b != null) {
|
if (b != null) {
|
||||||
|
|
Loading…
Reference in New Issue