mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-10 15:14:09 +00:00
lib/{mergeset,storage}: make it clear that DebugFlush() doesn't store all the recently ingested data to disk
DebugFlush() makes sure that the recently ingested data becomes visible to search. Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4272
This commit is contained in:
parent
9af04e4140
commit
f09745f613
2 changed files with 15 additions and 3 deletions
|
@ -594,9 +594,14 @@ func (tb *Table) mergePartsOptimal(pws []*partWrapper) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// DebugFlush flushes all the added items to the storage, so they become visible to search.
|
||||
// DebugFlush makes sure all the recently added data is visible to search.
|
||||
//
|
||||
// This function is only for debugging and testing.
|
||||
// Note: this function doesn't store all the in-memory data to disk - it just converts
|
||||
// recently added items to searchable parts, which can be stored either in memory
|
||||
// (if they are quite small) or to persistent disk.
|
||||
//
|
||||
// This function is for debugging and testing purposes only,
|
||||
// since it may slow down data ingestion when used frequently.
|
||||
func (tb *Table) DebugFlush() {
|
||||
tb.flushPendingItems(nil, true)
|
||||
|
||||
|
|
|
@ -298,7 +298,14 @@ func (s *Storage) updateDeletedMetricIDs(metricIDs *uint64set.Set) {
|
|||
s.deletedMetricIDsUpdateLock.Unlock()
|
||||
}
|
||||
|
||||
// DebugFlush flushes recently added storage data, so it becomes visible to search.
|
||||
// DebugFlush makes sure all the recently added data is visible to search.
|
||||
//
|
||||
// Note: this function doesn't store all the in-memory data to disk - it just converts
|
||||
// recently added items to searchable parts, which can be stored either in memory
|
||||
// (if they are quite small) or to persistent disk.
|
||||
//
|
||||
// This function is for debugging and testing purposes only,
|
||||
// since it may slow down data ingestion when used frequently.
|
||||
func (s *Storage) DebugFlush() {
|
||||
s.tb.flushPendingRows()
|
||||
s.idb().tb.DebugFlush()
|
||||
|
|
Loading…
Reference in a new issue