File tree 2 files changed +4
-4
lines changed
main/java/org/elasticsearch/index/fielddata/plain
test/java/org/elasticsearch/index/fielddata
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ protected CommonSettings.MemoryStorageFormat chooseStorageFormat(AtomicReader re
261
261
}
262
262
if (pageIndex == pageSize - 1 ) {
263
263
// end of page, we now know enough to estimate memory usage
264
- if (pageMaxOrdinal == Long .MAX_VALUE ) {
264
+ if (pageMaxOrdinal == Long .MIN_VALUE ) {
265
265
// empty page - will use the null reader which just stores size
266
266
pagedSingleValuesSize += RamUsageEstimator .alignObjectSize (RamUsageEstimator .NUM_BYTES_OBJECT_HEADER + RamUsageEstimator .NUM_BYTES_INT );
267
267
@@ -288,7 +288,7 @@ protected CommonSettings.MemoryStorageFormat chooseStorageFormat(AtomicReader re
288
288
if (pageIndex > 0 ) {
289
289
// last page estimation
290
290
pageIndex ++;
291
- if (pageMaxOrdinal == Long .MAX_VALUE ) {
291
+ if (pageMaxOrdinal == Long .MIN_VALUE ) {
292
292
// empty page - will use the null reader which just stores size
293
293
pagedSingleValuesSize += RamUsageEstimator .alignObjectSize (RamUsageEstimator .NUM_BYTES_OBJECT_HEADER + RamUsageEstimator .NUM_BYTES_INT );
294
294
Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ public long nextValue(Random r) {
281
281
},
282
282
SINGLE_VALUED_SPARSE_RANDOM {
283
283
public int numValues (Random r ) {
284
- return r .nextFloat () < 0.1f ? 1 : 0 ;
284
+ return r .nextFloat () < 0.01 ? 1 : 0 ;
285
285
}
286
286
287
287
@ Override
@@ -291,7 +291,7 @@ public long nextValue(Random r) {
291
291
},
292
292
MULTI_VALUED_SPARSE_RANDOM {
293
293
public int numValues (Random r ) {
294
- return r .nextFloat () < 0.1f ? 1 + r .nextInt (5 ) : 0 ;
294
+ return r .nextFloat () < 0.01f ? 1 + r .nextInt (5 ) : 0 ;
295
295
}
296
296
297
297
@ Override
You can’t perform that action at this time.
0 commit comments