forked from couchbase/indexing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
constant.go
74 lines (51 loc) · 2.11 KB
/
constant.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Copyright (c) 2014 Couchbase, Inc.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software distributed under the
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific language governing permissions
// and limitations under the License.
package indexer
//Max number of vbuckets supported in the system
const MAX_NUM_VBUCKETS = 1024
//Supervisor's channel capacity to buffer requests
//from workers
const WORKER_MSG_QUEUE_LEN = 1000000
// Intermediate message buffer channel size
const WORKER_RECV_QUEUE_LEN = 10000
// Default cluster address
const DEFAULT_CLUSTER_ENDPOINT = "127.0.0.1:9000"
const LOCALHOST = "127.0.0.1"
//Maintenance Topic Name
const MAINT_TOPIC = "MAINT_STREAM_TOPIC"
//Catchup Topic Name
const CATCHUP_TOPIC = "CATCHUP_STREAM_TOPIC"
//Initial Stream Topic Name
const INIT_TOPIC = "INIT_STREAM_TOPIC"
//Default Pool Name
const DEFAULT_POOL = "default"
//Max number of snapshot to be retained per index.
//Older snapshots are deleted.
const MAX_SNAPSHOTS_PER_INDEX = 5
//Slab Manager Specific constants
const DEFAULT_START_CHUNK_SIZE = 256
const DEFAULT_SLAB_SIZE = DEFAULT_START_CHUNK_SIZE * 1024
const DEFAULT_MAX_SLAB_MEMORY = DEFAULT_SLAB_SIZE * 1024
//Internal Buffer Size for Each Slice to store incoming
//requests
const SLICE_COMMAND_BUFFER_SIZE = 20000
const MAX_DOCID_LEN = 256
const ENCODE_BUF_SAFE_PAD = 512
// Constants for unlimiting entry size
const DEFAULT_MAX_SEC_KEY_LEN = 4608
const DEFAULT_MAX_ARRAY_KEY_SIZE = 10240
const MAX_KEY_EXTRABYTES_LEN = MAX_DOCID_LEN + 2
const RESIZE_PAD = 1024
const INDEXER_ID_KEY = "IndexerId"
const INDEXER_STATE_KEY = "IndexerState"
const INDEXER_NODE_UUID = "IndexerNodeUUID"
const MAX_KVWARMUP_RETRIES = 120
const MAX_METAKV_RETRIES = 100
const PLASMA_MEMQUOTA_FRAC = 0.9
const SCAN_ROLLBACK_ERROR_BATCHSIZE = 1000