mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
fix(boltdb): upgrade to the latest version to avoid problems with the race detector EE-2729 (#6638)
This commit is contained in:
parent
d962c300f9
commit
a66e863646
5 changed files with 10 additions and 17 deletions
|
@ -10,9 +10,9 @@ import (
|
|||
"path"
|
||||
"time"
|
||||
|
||||
"github.com/boltdb/bolt"
|
||||
dserrors "github.com/portainer/portainer/api/dataservices/errors"
|
||||
"github.com/sirupsen/logrus"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -181,10 +181,7 @@ func (connection *DbConnection) ConvertToKey(v int) []byte {
|
|||
func (connection *DbConnection) SetServiceName(bucketName string) error {
|
||||
return connection.Batch(func(tx *bolt.Tx) error {
|
||||
_, err := tx.CreateBucketIfNotExists([]byte(bucketName))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
return err
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"encoding/json"
|
||||
"time"
|
||||
|
||||
"github.com/boltdb/bolt"
|
||||
"github.com/sirupsen/logrus"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
// inspired by github.com/konoui/boltdb-exporter (which has no license)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue