日志仓管理

This commit is contained in:
gotoeasy 2022-07-07 16:57:23 +08:00
parent 548cc59b16
commit 2f0efbf5ec
2 changed files with 3 additions and 2 deletions

View File

@ -121,7 +121,8 @@ func (s *WordIndexStorage) loadIndexedCount() {
}
// 保存已建索引件数
func (s *WordIndexStorage) SavetIndexedCount(count uint32) error {
func (s *WordIndexStorage) SaveIndexedCount(count uint32) error {
s.indexedCount = count
return s.leveldb.Put(zeroUint16Bytes, cmn.Uint32ToBytes(count), nil)
}

View File

@ -307,7 +307,7 @@ func (s *LogDataStorage) saveMetaData() {
if s.savedIndexedCount < s.indexedCount {
s.savedIndexedCount = s.indexedCount
idxw := indexword.NewWordIndexStorage(s.StoreName())
idxw.SavetIndexedCount(s.savedIndexedCount)
idxw.SaveIndexedCount(s.savedIndexedCount)
log.Println("保存LogDataStorage已建索引件数:", s.savedIndexedCount)
}
}