|
11 | 11 | % How many replicas by default
|
12 | 12 | % -define(DEFAULT_REPLICAS, 3).
|
13 | 13 |
|
14 |
| -% How long to wait for replies from nodes |
15 |
| --define(NODE_TIMEOUT, 5 * ?SECOND). |
16 |
| - |
17 | 14 | % How long ddfs node startup can take
|
18 | 15 | -define(NODE_STARTUP, 1 * ?MINUTE).
|
19 | 16 |
|
| 17 | +% How long to wait for replies from nodes |
| 18 | +-define(NODE_TIMEOUT, 10 * ?SECOND). |
| 19 | + |
20 | 20 | % How long to wait for a reply from and operation that accesses nodes
|
21 | 21 | % (>NODE_TIMEOUT)
|
22 | 22 | -define(NODEOP_TIMEOUT, 1 * ?MINUTE).
|
|
60 | 60 | % Time to wait between garbage collection runs
|
61 | 61 | -define(GC_INTERVAL, ?DAY).
|
62 | 62 |
|
| 63 | +% Max duration for a GC run. This should be smaller than |
| 64 | +% min(ORPHANED_{BLOB,TAG}_EXPIRES). |
| 65 | +-define(GC_MAX_DURATION, 3 * ?DAY). |
| 66 | + |
| 67 | +% Time to wait after startup for cluster to stabilize before running |
| 68 | +% first GC. |
| 69 | +-define(GC_DEFAULT_INITIAL_WAIT, 5 * ?MINUTE). |
| 70 | + |
| 71 | +% Maximum number of times we try to bring up a node that failed during |
| 72 | +% GC before we abort GC. |
| 73 | +-define(MAX_GC_NODE_FAILURES, 3). |
| 74 | + |
| 75 | +% The longest potential interval between messages in the GC protocol; |
| 76 | +% used to ensure GC makes forward progress. This can be set to the |
| 77 | +% estimated time to traverse all the volumes on a DDFS node. |
| 78 | +-define(GC_PROGRESS_INTERVAL, 30 * ?MINUTE). |
| 79 | + |
63 | 80 | % Tag cache expires in this many milliseconds if tag can't be fetched
|
64 | 81 | -define(TAG_EXPIRES_ONERROR, 1 * ?SECOND).
|
65 | 82 |
|
66 | 83 | % Number of tag replicas: min(length(Nodes), ?TAG_REPLICAS)
|
67 | 84 | % -define(TAG_REPLICAS, 3).
|
68 | 85 |
|
| 86 | +% Number of extra replicas (i.e. lost replicas recovered during GC) to |
| 87 | +% allow before deleting extra replicas. |
| 88 | +-define(NUM_EXTRA_REPLICAS, 1). |
| 89 | + |
69 | 90 | % Permissions for blobs and tags
|
70 | 91 | -define(FILE_MODE, 8#00400).
|
71 | 92 |
|
|
94 | 115 | % Delete !partial leftovers after this many milliseconds
|
95 | 116 | -define(PARTIAL_EXPIRES, ?DAY).
|
96 | 117 |
|
97 |
| -% When orphaned blob can be deleted |
| 118 | +% When orphaned blob can be deleted |
98 | 119 | -define(ORPHANED_BLOB_EXPIRES, 5 * ?DAY).
|
99 | 120 |
|
100 |
| -% When orphaned tag can be deleted |
| 121 | +% When orphaned tag can be deleted |
101 | 122 | -define(ORPHANED_TAG_EXPIRES, 5 * ?DAY).
|
102 | 123 |
|
103 | 124 | % How long a tag has to stay on the deleted list before
|
104 | 125 | % we can permanently forget it, after all known instances
|
105 |
| -% of the tag object have been removed. This quarantine period |
106 |
| -% ensures that a node that was temporarily unavailable |
| 126 | +% of the tag object have been removed. This quarantine period |
| 127 | +% ensures that a node that was temporarily unavailable |
107 | 128 | % and reactivates can't resurrect deleted tags. You
|
108 | 129 | % must ensure that all temporarily inactive nodes
|
109 | 130 | % are reactivated (or cleaned) within the ?DELETED_TAG_EXPIRES
|
110 | 131 | % time frame. To be on the safe side, make the period long
|
111 | 132 | % enough.
|
112 | 133 | -define(DELETED_TAG_EXPIRES, 30 * ?DAY).
|
| 134 | + |
| 135 | +% How many times a tag operation should be retried before aborting. |
| 136 | +-define(MAX_TAG_OP_RETRIES, 3). |
| 137 | + |
| 138 | +% How long to wait before timing out a tag retrieval. |
| 139 | +-define(GET_TAG_TIMEOUT, 5 * ?MINUTE). |
0 commit comments