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;}
15 "This module contains the base YANG definitions for
16 the distributed datastore provider implementation";
18 revision "2014-06-12" {
23 // This is the definition of the service implementation as a module identity.
24 identity distributed-config-datastore-provider {
25 base config:module-type;
26 config:provided-service config-dom-store-spi:config-dom-datastore;
27 // Specifies the prefix for generated java classes.
28 config:java-name-prefix DistributedConfigDataStoreProvider;
31 // This is the definition of the service implementation as a module identity.
32 identity distributed-operational-datastore-provider {
33 base config:module-type;
34 config:provided-service operational-dom-store-spi:operational-dom-datastore;
35 // Specifies the prefix for generated java classes.
36 config:java-name-prefix DistributedOperationalDataStoreProvider;
39 typedef non-zero-uint32-type {
45 typedef operation-timeout-type {
51 typedef heartbeat-interval-type {
63 grouping data-store-properties {
64 leaf max-shard-data-change-executor-queue-size {
66 type non-zero-uint32-type;
67 description "The maximum queue size for each shard's data store data change notification executor.";
70 leaf max-shard-data-change-executor-pool-size {
72 type non-zero-uint32-type;
73 description "The maximum thread pool size for each shard's data store data change notification executor.";
76 leaf max-shard-data-change-listener-queue-size {
78 type non-zero-uint32-type;
79 description "The maximum queue size for each shard's data store data change listener.";
82 leaf max-shard-data-store-executor-queue-size {
84 type non-zero-uint32-type;
85 description "The maximum queue size for each shard's data store executor.";
88 leaf shard-transaction-idle-timeout-in-minutes {
90 type non-zero-uint32-type;
91 description "The maximum amount of time a shard transaction can be idle without receiving any messages before it self-destructs.";
94 leaf shard-snapshot-batch-count {
96 type non-zero-uint32-type;
97 description "The minimum number of entries to be present in the in-memory journal log before a snapshot is to be taken.";
100 leaf shard-snapshot-data-threshold-percentage {
103 description "The percentage of Runtime.totalMemory() used by the in-memory journal log before a snapshot is to be taken";
107 leaf shard-heartbeat-interval-in-millis {
109 type heartbeat-interval-type;
110 description "The interval at which a shard will send a heart beat message to its remote shard.";
113 leaf shard-election-timeout-factor {
115 type non-zero-uint32-type;
116 description "The multiplication factor to be used to determine shard election timeout. The shard election timeout
117 is determined by multiplying shard-heartbeat-interval-in-millis with the shard-election-timeout-factor";
120 leaf operation-timeout-in-seconds {
122 type operation-timeout-type;
123 description "The maximum amount of time for akka operations (remote or local) to complete before failing.";
126 leaf shard-journal-recovery-log-batch-size {
128 type non-zero-uint32-type;
129 description "The maximum number of journal log entries to batch on recovery for a shard before committing to the data store.";
132 leaf shard-transaction-commit-timeout-in-seconds {
134 type non-zero-uint32-type;
135 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";
138 leaf shard-transaction-commit-queue-capacity {
140 type non-zero-uint32-type;
141 description "The maximum allowed capacity for each shard's transaction commit queue.";
144 leaf shard-commit-queue-expiry-timeout-in-seconds {
145 default 120; // 2 minutes
146 type non-zero-uint32-type;
147 description "The maximum amount of time a transaction can remain in a shard's commit queue waiting
148 to begin the CanCommit phase as coordinated by the broker front-end. Normally this should be
149 quick but latencies can occur in between transaction ready and CanCommit or a remote broker
150 could lose connection and CanCommit might never occur. Expiring transactions from the queue
151 allows subsequent pending transaction to be processed.";
154 leaf shard-initialization-timeout-in-seconds {
155 default 300; // 5 minutes
156 type non-zero-uint32-type;
157 description "The maximum amount of time to wait for a shard to initialize from persistence
158 on startup before failing an operation (eg transaction create and change
159 listener registration).";
162 leaf shard-leader-election-timeout-in-seconds {
164 type non-zero-uint32-type;
165 description "The maximum amount of time to wait for a shard to elect a leader before failing
166 an operation (eg transaction create).";
169 leaf shard-batched-modification-count {
171 type non-zero-uint32-type;
172 description "The number of transaction modification operations (put, merge, delete) to
173 batch before sending to the shard transaction actor. Batching improves
174 performance as less modifications messages are sent to the actor and thus
175 lessens the chance that the transaction actor's mailbox queue could get full.";
178 leaf enable-metric-capture {
181 description "Enable or disable metric capture.";
184 leaf bounded-mailbox-capacity {
186 type non-zero-uint32-type;
187 description "Max queue size that an actor's mailbox can reach";
193 description "Enable or disable data persistence";
196 leaf shard-isolated-leader-check-interval-in-millis {
198 type heartbeat-interval-type;
199 description "The interval at which the leader of the shard will check if its majority
200 followers are active and term itself as isolated";
203 leaf transaction-creation-initial-rate-limit {
205 type non-zero-uint32-type;
206 description "The initial number of transactions per second that are allowed before the data store
207 should begin applying back pressure. This number is only used as an initial guidance,
208 subsequently the datastore measures the latency for a commit and auto-adjusts the rate limit";
211 leaf transaction-debug-context-enabled {
214 description "Enable or disable transaction context debug. This will log the call site trace for
215 transactions that fail";
218 leaf custom-raft-policy-implementation {
221 description "A fully qualified java class name. The class should implement
222 org.opendaylight.controller.cluster.raft.policy.RaftPolicy. This java class should be
223 accessible to the distributed data store OSGi module so that it can be dynamically loaded via
224 reflection. For now let's assume that these classes to customize raft behaviors should be
225 present in the distributed data store module itself. If this property is set to a class which
226 cannot be found then the default raft behavior will be applied";
230 // Augments the 'configuration' choice node under modules/module.
231 augment "/config:modules/config:module/config:configuration" {
232 case distributed-config-datastore-provider {
233 when "/config:modules/config:module/config:type = 'distributed-config-datastore-provider'";
234 container config-schema-service {
235 uses config:service-ref {
238 config:required-identity sal:schema-service;
243 container config-properties {
244 uses data-store-properties;
249 // Augments the 'configuration' choice node under modules/module.
250 augment "/config:modules/config:module/config:configuration" {
251 case distributed-operational-datastore-provider {
252 when "/config:modules/config:module/config:type = 'distributed-operational-datastore-provider'";
253 container operational-schema-service {
254 uses config:service-ref {
257 config:required-identity sal:schema-service;
262 container operational-properties {
263 uses data-store-properties;