DefaultOptions used for the DB. They are reasonable for setups using millisecond precision timestamps.
()
| 74 | // DefaultOptions used for the DB. They are reasonable for setups using |
| 75 | // millisecond precision timestamps. |
| 76 | func DefaultOptions() *Options { |
| 77 | return &Options{ |
| 78 | WALSegmentSize: wlog.DefaultSegmentSize, |
| 79 | MaxBlockChunkSegmentSize: chunks.DefaultChunkSegmentSize, |
| 80 | RetentionDuration: int64(15 * 24 * time.Hour / time.Millisecond), |
| 81 | MinBlockDuration: DefaultBlockDuration, |
| 82 | MaxBlockDuration: DefaultBlockDuration, |
| 83 | NoLockfile: false, |
| 84 | SamplesPerChunk: DefaultSamplesPerChunk, |
| 85 | WALCompression: compression.None, |
| 86 | StripeSize: DefaultStripeSize, |
| 87 | HeadChunksWriteBufferSize: chunks.DefaultWriteBufferSize, |
| 88 | IsolationDisabled: defaultIsolationDisabled, |
| 89 | HeadChunksWriteQueueSize: chunks.DefaultWriteQueueSize, |
| 90 | OutOfOrderCapMax: DefaultOutOfOrderCapMax, |
| 91 | EnableOverlappingCompaction: true, |
| 92 | EnableSharding: false, |
| 93 | EnableDelayedCompaction: false, |
| 94 | FloatChunkEncoding: chunkenc.EncXOR, |
| 95 | CompactionDelayMaxPercent: DefaultCompactionDelayMaxPercent, |
| 96 | CompactionDelay: time.Duration(0), |
| 97 | PostingsDecoderFactory: DefaultPostingsDecoderFactory, |
| 98 | BlockReloadInterval: 1 * time.Minute, |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | // Options of the DB storage. |
| 103 | type Options struct { |
searching dependent graphs…