mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-16 00:41:24 +01:00
lib/storage: remove unused code from getMetricIDsForTimeRange: it is expected that time range is always non-zero
This commit is contained in:
parent
c16e17dede
commit
9a43902bd8
@ -1938,9 +1938,6 @@ var errFallbackToMetricNameMatch = errors.New("fall back to updateMetricIDsByMet
|
||||
var errMissingMetricIDsForDate = errors.New("missing metricIDs for date")
|
||||
|
||||
func (is *indexSearch) getMetricIDsForTimeRange(tr TimeRange, maxMetrics int, accountID, projectID uint32) (*uint64set.Set, error) {
|
||||
if tr.isZero() {
|
||||
return nil, errMissingMetricIDsForDate
|
||||
}
|
||||
atomic.AddUint64(&is.db.recentHourMetricIDsSearchCalls, 1)
|
||||
metricIDs, ok := is.getMetricIDsForRecentHours(tr, maxMetrics, accountID, projectID)
|
||||
if ok {
|
||||
|
@ -31,10 +31,6 @@ func (tr *TimeRange) String() string {
|
||||
return fmt.Sprintf("[%s - %s]", minTime, maxTime)
|
||||
}
|
||||
|
||||
func (tr *TimeRange) isZero() bool {
|
||||
return tr.MinTimestamp == 0 && tr.MaxTimestamp == 0
|
||||
}
|
||||
|
||||
// timestampToPartitionName returns partition name for the given timestamp.
|
||||
func timestampToPartitionName(timestamp int64) string {
|
||||
t := timestampToTime(timestamp)
|
||||
|
Loading…
Reference in New Issue
Block a user