mirror of
https://github.com/gotoeasy/glogcenter.git
synced 2025-09-15 12:58:34 +08:00
日志仓管理
This commit is contained in:
parent
548cc59b16
commit
2f0efbf5ec
@ -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)
|
return s.leveldb.Put(zeroUint16Bytes, cmn.Uint32ToBytes(count), nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -307,7 +307,7 @@ func (s *LogDataStorage) saveMetaData() {
|
|||||||
if s.savedIndexedCount < s.indexedCount {
|
if s.savedIndexedCount < s.indexedCount {
|
||||||
s.savedIndexedCount = s.indexedCount
|
s.savedIndexedCount = s.indexedCount
|
||||||
idxw := indexword.NewWordIndexStorage(s.StoreName())
|
idxw := indexword.NewWordIndexStorage(s.StoreName())
|
||||||
idxw.SavetIndexedCount(s.savedIndexedCount)
|
idxw.SaveIndexedCount(s.savedIndexedCount)
|
||||||
log.Println("保存LogDataStorage已建索引件数:", s.savedIndexedCount)
|
log.Println("保存LogDataStorage已建索引件数:", s.savedIndexedCount)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user