mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +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
664db964ca
commit
09b403d38a
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)
|
||||
|
||||
|
|
|
@ -283,7 +283,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