rename defaultBatchSize to defaultCompactBatchSize
This commit is contained in:
parent
b5a4378a46
commit
09fcc69516
@ -28,8 +28,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Name = "boltdb"
|
Name = "boltdb"
|
||||||
defaultBatchSize = 100
|
defaultCompactBatchSize = 100
|
||||||
)
|
)
|
||||||
|
|
||||||
type Store struct {
|
type Store struct {
|
||||||
@ -143,7 +143,7 @@ func (bs *Store) CompactWithBatchSize(batchSize int) error {
|
|||||||
// Compact calls CompactWithBatchSize with a default batch size of 100. This is a workaround
|
// Compact calls CompactWithBatchSize with a default batch size of 100. This is a workaround
|
||||||
// for github issue #374.
|
// for github issue #374.
|
||||||
func (bs *Store) Compact() error {
|
func (bs *Store) Compact() error {
|
||||||
return bs.CompactWithBatchSize(defaultBatchSize)
|
return bs.CompactWithBatchSize(defaultCompactBatchSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -21,8 +21,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Name = "goleveldb"
|
Name = "goleveldb"
|
||||||
defaultBatchSize = 250
|
defaultCompactBatchSize = 250
|
||||||
)
|
)
|
||||||
|
|
||||||
type Store struct {
|
type Store struct {
|
||||||
@ -132,7 +132,7 @@ func (ldbs *Store) CompactWithBatchSize(batchSize int) error {
|
|||||||
// Compact compacts the underlying goleveldb store. The current implementation includes a workaround
|
// Compact compacts the underlying goleveldb store. The current implementation includes a workaround
|
||||||
// for github issue #374 (see CompactWithBatchSize).
|
// for github issue #374 (see CompactWithBatchSize).
|
||||||
func (ldbs *Store) Compact() error {
|
func (ldbs *Store) Compact() error {
|
||||||
return ldbs.CompactWithBatchSize(defaultBatchSize)
|
return ldbs.CompactWithBatchSize(defaultCompactBatchSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
Loading…
Reference in New Issue
Block a user