mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-12 06:17:27 -08:00
remove Unused parameter 'reg' in wal.Open function (#6941)
Signed-off-by: fuling <fuling.lgz@alibaba-inc.com>
This commit is contained in:
parent
a17ddcf0f9
commit
261cbab8e9
|
@ -303,7 +303,7 @@ func (db *DBReadOnly) FlushWAL(dir string) error {
|
|||
if len(blockReaders) > 0 {
|
||||
maxBlockTime = blockReaders[len(blockReaders)-1].Meta().MaxTime
|
||||
}
|
||||
w, err := wal.Open(db.logger, nil, filepath.Join(db.dir, "wal"))
|
||||
w, err := wal.Open(db.logger, filepath.Join(db.dir, "wal"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -371,7 +371,7 @@ func (db *DBReadOnly) Querier(ctx context.Context, mint, maxt int64) (storage.Qu
|
|||
|
||||
// Also add the WAL if the current blocks don't cover the requests time range.
|
||||
if maxBlockTime <= maxt {
|
||||
w, err := wal.Open(db.logger, nil, filepath.Join(db.dir, "wal"))
|
||||
w, err := wal.Open(db.logger, filepath.Join(db.dir, "wal"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -293,7 +293,7 @@ func NewSize(logger log.Logger, reg prometheus.Registerer, dir string, segmentSi
|
|||
}
|
||||
|
||||
// Open an existing WAL.
|
||||
func Open(logger log.Logger, reg prometheus.Registerer, dir string) (*WAL, error) {
|
||||
func Open(logger log.Logger, dir string) (*WAL, error) {
|
||||
if logger == nil {
|
||||
logger = log.NewNopLogger()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue