rename defaultBatchSize to defaultCompactBatchSize
This commit is contained in:
parent
b5a4378a46
commit
09fcc69516
|
@ -28,8 +28,8 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
Name = "boltdb"
|
||||
defaultBatchSize = 100
|
||||
Name = "boltdb"
|
||||
defaultCompactBatchSize = 100
|
||||
)
|
||||
|
||||
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
|
||||
// for github issue #374.
|
||||
func (bs *Store) Compact() error {
|
||||
return bs.CompactWithBatchSize(defaultBatchSize)
|
||||
return bs.CompactWithBatchSize(defaultCompactBatchSize)
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -21,8 +21,8 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
Name = "goleveldb"
|
||||
defaultBatchSize = 250
|
||||
Name = "goleveldb"
|
||||
defaultCompactBatchSize = 250
|
||||
)
|
||||
|
||||
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
|
||||
// for github issue #374 (see CompactWithBatchSize).
|
||||
func (ldbs *Store) Compact() error {
|
||||
return ldbs.CompactWithBatchSize(defaultBatchSize)
|
||||
return ldbs.CompactWithBatchSize(defaultCompactBatchSize)
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user