Merge pull request 'Fix madvise code' (#38) from master into release
Reviewed-on: https://git.marginalia.nu/marginalia/marginalia.nu/pulls/38
This commit is contained in:
commit
b571b15c71
@ -10,7 +10,7 @@ import static java.lang.Math.min;
|
||||
public class BTreeReader {
|
||||
|
||||
private final MultimapFileLong file;
|
||||
private final BTreeContext ctx;
|
||||
public final BTreeContext ctx;
|
||||
|
||||
private final MultimapSearcher indexSearcher;
|
||||
private final MultimapSearcher dataSearcher;
|
||||
|
@ -95,7 +95,7 @@ public class IndexWordsTable implements AutoCloseable {
|
||||
offsetConsumer.accept(words.get(posOffset+1));
|
||||
}
|
||||
}
|
||||
catch (RuntimeException ex) {
|
||||
catch (Exception ex) {
|
||||
logger.warn("Error @ " + i, ex);
|
||||
break;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ public class SearchIndex implements AutoCloseable {
|
||||
|
||||
if (length > 0) {
|
||||
urls.adviceRange(NativeIO.Advice.WillNeed, h.indexOffsetLongs(), length);
|
||||
urls.adviceRange(NativeIO.Advice.Normal, h.dataOffsetLongs(), 2048);
|
||||
urls.adviceRange(NativeIO.Advice.Normal, h.dataOffsetLongs(), Math.min(2048, h.numEntries()*bTreeReader.ctx.entrySize()));
|
||||
urls.pokeRange(h.indexOffsetLongs(), length);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user