1 // vi: set smarttab et sw=4 tabstop=4:
2 module distributed-datastore-provider {
5 namespace "urn:opendaylight:params:xml:ns:yang:controller:config:distributed-datastore-provider";
6 prefix "distributed-datastore-provider";
8 import config { prefix config; revision-date 2013-04-05; }
9 import rpc-context { prefix rpcx; revision-date 2013-06-17; }
10 import opendaylight-config-dom-datastore {prefix config-dom-store-spi;}
11 import opendaylight-operational-dom-datastore {prefix operational-dom-store-spi;}
12 import opendaylight-md-sal-dom {prefix sal;}
13 import actor-system-provider-service {prefix actor-system;}
16 "This module contains the base YANG definitions for
17 the distributed datastore provider implementation";
19 revision "2014-06-12" {
24 // This is the definition of the service implementation as a module identity.
25 identity distributed-config-datastore-provider {
26 base config:module-type;
27 config:provided-service config-dom-store-spi:config-dom-datastore;
28 // Specifies the prefix for generated java classes.
29 config:java-name-prefix DistributedConfigDataStoreProvider;
32 // This is the definition of the service implementation as a module identity.
33 identity distributed-operational-datastore-provider {
34 base config:module-type;
35 config:provided-service operational-dom-store-spi:operational-dom-datastore;
36 // Specifies the prefix for generated java classes.
37 config:java-name-prefix DistributedOperationalDataStoreProvider;
40 typedef non-zero-uint32-type {
46 typedef operation-timeout-type {
52 typedef heartbeat-interval-type {
64 grouping data-store-properties {
65 leaf max-shard-data-change-executor-queue-size {
67 type non-zero-uint32-type;
68 description "The maximum queue size for each shard's data store data change notification executor.";
71 leaf max-shard-data-change-executor-pool-size {
73 type non-zero-uint32-type;
74 description "The maximum thread pool size for each shard's data store data change notification executor.";
77 leaf max-shard-data-change-listener-queue-size {
79 type non-zero-uint32-type;
80 description "The maximum queue size for each shard's data store data change listener.";
83 leaf max-shard-data-store-executor-queue-size {
85 type non-zero-uint32-type;
86 description "The maximum queue size for each shard's data store executor.";
89 leaf shard-transaction-idle-timeout-in-minutes {
91 type non-zero-uint32-type;
92 description "The maximum amount of time a shard transaction can be idle without receiving any messages before it self-destructs.";
95 leaf shard-snapshot-batch-count {
97 type non-zero-uint32-type;
98 description "The minimum number of entries to be present in the in-memory journal log before a snapshot is to be taken.";
101 leaf shard-snapshot-data-threshold-percentage {
104 description "The percentage of Runtime.maxMemory() used by the in-memory journal log before a snapshot is to be taken";
108 leaf shard-heartbeat-interval-in-millis {
110 type heartbeat-interval-type;
111 description "The interval at which a shard will send a heart beat message to its remote shard.";
114 leaf shard-election-timeout-factor {
116 type non-zero-uint32-type;
117 description "The multiplication factor to be used to determine shard election timeout. The shard election timeout
118 is determined by multiplying shard-heartbeat-interval-in-millis with the shard-election-timeout-factor";
121 leaf operation-timeout-in-seconds {
123 type operation-timeout-type;
124 description "The maximum amount of time for akka operations (remote or local) to complete before failing.";
127 leaf shard-journal-recovery-log-batch-size {
129 type non-zero-uint32-type;
130 description "The maximum number of journal log entries to batch on recovery for a shard before committing to the data store.";
133 leaf shard-transaction-commit-timeout-in-seconds {
135 type non-zero-uint32-type;
136 description "The maximum amount of time a shard transaction three-phase commit can be idle without receiving the next messages before it aborts the transaction";
139 leaf shard-transaction-commit-queue-capacity {
141 type non-zero-uint32-type;
142 description "The maximum allowed capacity for each shard's transaction commit queue.";
145 leaf shard-commit-queue-expiry-timeout-in-seconds {
146 default 120; // 2 minutes
147 type non-zero-uint32-type;
148 description "The maximum amount of time a transaction can remain in a shard's commit queue waiting
149 to begin the CanCommit phase as coordinated by the broker front-end. Normally this should be
150 quick but latencies can occur in between transaction ready and CanCommit or a remote broker
151 could lose connection and CanCommit might never occur. Expiring transactions from the queue
152 allows subsequent pending transaction to be processed.";
155 leaf shard-initialization-timeout-in-seconds {
156 default 300; // 5 minutes
157 type non-zero-uint32-type;
158 description "The maximum amount of time to wait for a shard to initialize from persistence
159 on startup before failing an operation (eg transaction create and change
160 listener registration).";
163 leaf shard-leader-election-timeout-in-seconds {
165 type non-zero-uint32-type;
166 description "The maximum amount of time to wait for a shard to elect a leader before failing
167 an operation (eg transaction create).";
170 leaf shard-batched-modification-count {
172 type non-zero-uint32-type;
173 description "The number of transaction modification operations (put, merge, delete) to
174 batch before sending to the shard transaction actor. Batching improves
175 performance as less modifications messages are sent to the actor and thus
176 lessens the chance that the transaction actor's mailbox queue could get full.";
179 leaf enable-metric-capture {
182 description "Enable or disable metric capture.";
185 leaf bounded-mailbox-capacity {
187 type non-zero-uint32-type;
188 description "Max queue size that an actor's mailbox can reach";
194 description "Enable or disable data persistence";
197 leaf shard-isolated-leader-check-interval-in-millis {
199 type heartbeat-interval-type;
200 description "The interval at which the leader of the shard will check if its majority
201 followers are active and term itself as isolated";
204 leaf transaction-creation-initial-rate-limit {
206 type non-zero-uint32-type;
207 description "The initial number of transactions per second that are allowed before the data store
208 should begin applying back pressure. This number is only used as an initial guidance,
209 subsequently the datastore measures the latency for a commit and auto-adjusts the rate limit";
212 leaf transaction-debug-context-enabled {
215 description "Enable or disable transaction context debug. This will log the call site trace for
216 transactions that fail";
219 leaf custom-raft-policy-implementation {
222 description "A fully qualified java class name. The class should implement
223 org.opendaylight.controller.cluster.raft.policy.RaftPolicy. This java class should be
224 accessible to the distributed data store OSGi module so that it can be dynamically loaded via
225 reflection. For now let's assume that these classes to customize raft behaviors should be
226 present in the distributed data store module itself. If this property is set to a class which
227 cannot be found then the default raft behavior will be applied";
230 leaf shard-snapshot-chunk-size {
233 type non-zero-uint32-type;
234 description "When sending a snapshot to a follower, this is the maximum size in bytes for
238 leaf maximum-message-slice-size {
240 type non-zero-uint32-type;
241 description "When fragmenting messages thru the akka remoting framework, this is the
242 maximum size in bytes for a message slice.";
245 leaf use-tell-based-protocol {
248 description "Use a newer protocol between the frontend and backend. This feature is considered
249 exprerimental at this point.";
252 leaf file-backed-streaming-threshold-in-megabytes {
254 type non-zero-uint32-type;
255 description "When streaming large amounts of data, eg when sending a snapshot to a follower, this
256 is the threshold in terms of number of megabytes before it should switch from storing in memory to
257 buffering to a file.";
260 leaf sync-index-threshold {
262 type non-zero-uint32-type;
263 description "Permitted synchronization lag, expressed in terms of RAFT entry count. It a follower's
264 commitIndex trails the leader's journal by more than this amount of entries the follower
265 is considered to be out-of-sync.";
268 leaf backend-aliveness-timer-interval-in-seconds {
270 type non-zero-uint32-type;
271 description "The timer interval whereby, on expiration after response inactivity from the back-end,
272 the connection to the back-end is torn down and reconnection is attempted.";
275 leaf frontend-request-timeout-in-seconds {
276 default 120; // 2 minutes
277 type non-zero-uint32-type;
278 description "The timeout interval whereby client frontend transaction requests are failed.";
281 leaf frontend-no-progress-timeout-in-seconds {
282 default 900; // 15 minutes
283 type non-zero-uint32-type;
284 description "The timeout interval whereby the client front-end hasn't made progress with the
285 back-end on any request and terminates.";
289 container data-store-properties-container {
290 uses data-store-properties;
293 // Augments the 'configuration' choice node under modules/module.
294 augment "/config:modules/config:module/config:configuration" {
295 case distributed-config-datastore-provider {
296 when "/config:modules/config:module/config:type = 'distributed-config-datastore-provider'";
297 container config-schema-service {
298 uses config:service-ref {
301 config:required-identity sal:schema-service;
306 container config-actor-system-provider {
307 uses config:service-ref {
310 config:required-identity actor-system:actor-system-provider-service;
315 container config-properties {
316 uses data-store-properties;
321 // Augments the 'configuration' choice node under modules/module.
322 augment "/config:modules/config:module/config:configuration" {
323 case distributed-operational-datastore-provider {
324 when "/config:modules/config:module/config:type = 'distributed-operational-datastore-provider'";
325 container operational-schema-service {
326 uses config:service-ref {
329 config:required-identity sal:schema-service;
334 container operational-actor-system-provider {
335 uses config:service-ref {
338 config:required-identity actor-system:actor-system-provider-service;
343 container operational-properties {
344 uses data-store-properties;