re-use the Header

This commit is contained in:
lionsoul2014 2026-05-09 19:52:13 +08:00
parent 3147144a7f
commit 59cf547107
1 changed files with 4 additions and 4 deletions

View File

@ -95,12 +95,12 @@ public class ConfigBuilder {
// 1, load the content buffer
final LongByteArray cBuffer = Searcher.loadContentFromInputStream(xdbInputStream, cacheSliceBytes);
// 2, verify the xdb from the buffer
Searcher.verify(Searcher.loadHeaderFromBuffer(cBuffer), cBuffer.length());
// 3, load the header
// 2, load the header
final Header header = Searcher.loadHeaderFromBuffer(cBuffer);
// 3, verify the xdb from the buffer
Searcher.verify(header, cBuffer.length());
// create the config without xdbFile and vIndex
return new Config(cachePolicy, ipVersion, null, header, null, cBuffer, searchers, fairLock);
}