PIBinaryLog recreate index performance patch
This commit is contained in:
@@ -153,6 +153,7 @@ bool PIBinaryLog::openDevice() {
|
||||
bool PIBinaryLog::closeDevice() {
|
||||
stopThreadedRead();
|
||||
pausemutex.unlock();
|
||||
logmutex.unlock();
|
||||
moveIndex(-1);
|
||||
is_indexed = false;
|
||||
index.clear();
|
||||
@@ -654,7 +655,9 @@ bool PIBinaryLog::createIndex() {
|
||||
llong cp = file.pos();
|
||||
file.seekToBegin();
|
||||
index.clear();
|
||||
index = PIVector<BinLogIndex>();
|
||||
index_pos.clear();
|
||||
index_pos = PIMap<llong, int>();
|
||||
parseLog(&file, &binfo, &index);
|
||||
file.seek(cp);
|
||||
is_indexed = !index.isEmpty();
|
||||
|
||||
Reference in New Issue
Block a user