commit
e83eca61ca
|
@ -19,7 +19,7 @@ import (
|
|||
// testing, a value above the number of cores on the machine does not provide
|
||||
// any additional benefit. For now we'll set it to the number of cores on the
|
||||
// largest box we could imagine running influx.
|
||||
const ringShards = 4096
|
||||
const ringShards = 16
|
||||
|
||||
var (
|
||||
// ErrSnapshotInProgress is returned if a snapshot is attempted while one is already running.
|
||||
|
|
|
@ -13,7 +13,7 @@ import (
|
|||
// basically defines the maximum number of partitions you can have in the ring.
|
||||
// If a smaller number of partitions are chosen when creating a ring, then
|
||||
// they're evenly spread across this many partitions in the ring.
|
||||
const partitions = 4096
|
||||
const partitions = 16
|
||||
|
||||
// ring is a structure that maps series keys to entries.
|
||||
//
|
||||
|
|
|
@ -12,8 +12,8 @@ func TestRing_newRing(t *testing.T) {
|
|||
n int
|
||||
returnErr bool
|
||||
}{
|
||||
{n: 1}, {n: 2}, {n: 4}, {n: 8}, {n: 16}, {n: 32}, {n: 64}, {n: 128}, {n: 256},
|
||||
{n: 0, returnErr: true}, {n: 3, returnErr: true}, {n: 512, returnErr: true},
|
||||
{n: 1}, {n: 2}, {n: 4}, {n: 8}, {n: 16}, {n: 32, returnErr: true},
|
||||
{n: 0, returnErr: true}, {n: 3, returnErr: true},
|
||||
}
|
||||
|
||||
for i, example := range examples {
|
||||
|
|
|
@ -1025,7 +1025,7 @@ type WALSegmentWriter struct {
|
|||
// NewWALSegmentWriter returns a new WALSegmentWriter writing to w.
|
||||
func NewWALSegmentWriter(w io.WriteCloser) *WALSegmentWriter {
|
||||
return &WALSegmentWriter{
|
||||
bw: bufio.NewWriter(w),
|
||||
bw: bufio.NewWriterSize(w, 16*1024),
|
||||
w: w,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue