Skip to content

Commit a8dd1f9

Browse files
steveruckdashelkaralabe
authored andcommitted
node: switching prometheus flock location to tsdb (#19376)
* node: switching prometheus flock location to tsdb * rookie mistake
1 parent d5cae48 commit a8dd1f9

24 files changed

Lines changed: 677 additions & 109 deletions

‎node/node.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import (
3434
"github.com/ethereum/go-ethereum/log"
3535
"github.com/ethereum/go-ethereum/p2p"
3636
"github.com/ethereum/go-ethereum/rpc"
37-
"github.com/prometheus/prometheus/util/flock"
37+
"github.com/prometheus/tsdb/fileutil"
3838
)
3939

4040
// Node is a container on which services can be registered.
@@ -43,8 +43,8 @@ type Node struct {
4343
config *Config
4444
accman *accounts.Manager
4545

46-
ephemeralKeystore string // if non-empty, the key directory that will be removed by Stop
47-
instanceDirLock flock.Releaser // prevents concurrent use of instance directory
46+
ephemeralKeystore string // if non-empty, the key directory that will be removed by Stop
47+
instanceDirLock fileutil.Releaser // prevents concurrent use of instance directory
4848

4949
serverConfig p2p.Config
5050
server *p2p.Server // Currently running P2P networking layer
@@ -267,7 +267,7 @@ func (n *Node) openDataDir() error {
267267
}
268268
// Lock the instance directory to prevent concurrent use by another instance as well as
269269
// accidental use of the instance directory as a database.
270-
release, _, err := flock.New(filepath.Join(instdir, "LOCK"))
270+
release, _, err := fileutil.Flock(filepath.Join(instdir, "LOCK"))
271271
if err != nil {
272272
return convertFileLockError(err)
273273
}

‎vendor/github.com/prometheus/prometheus/NOTICE‎

Lines changed: 0 additions & 87 deletions
This file was deleted.
File renamed without changes.

‎vendor/github.com/prometheus/tsdb/fileutil/dir_unix.go‎

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎vendor/github.com/prometheus/tsdb/fileutil/dir_windows.go‎

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎vendor/github.com/prometheus/tsdb/fileutil/fileutil.go‎

Lines changed: 149 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/prometheus/prometheus/util/flock/flock.go renamed to vendor/github.com/prometheus/tsdb/fileutil/flock.go

Lines changed: 5 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/prometheus/prometheus/util/flock/flock_plan9.go renamed to vendor/github.com/prometheus/tsdb/fileutil/flock_plan9.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/prometheus/prometheus/util/flock/flock_solaris.go renamed to vendor/github.com/prometheus/tsdb/fileutil/flock_solaris.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)