Skip to content

Commit 71db722

Browse files
authored
DOC-614 | Adjustable writeConcern (#465)
* writeConcern adjustable together with distributeShardsLike * Adjust descriptions, retrofitting 3.10 and 3.11 APIs
1 parent 813f461 commit 71db722

File tree

11 files changed

+124
-30
lines changed

11 files changed

+124
-30
lines changed

site/content/3.10/develop/http-api/collections.md

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,14 @@ paths:
288288
in the cluster, a shard refuses to write. Writes to shards with enough
289289
up-to-date copies succeed at the same time, however. The value of
290290
`writeConcern` cannot be greater than `replicationFactor`.
291+
292+
If `distributeShardsLike` is set, the `writeConcern`
293+
is that of the prototype collection.
291294
For SatelliteCollections, the `writeConcern` is automatically controlled to
292-
equal the number of DB-Servers and has a value of `0`. _(cluster only)_
295+
equal the number of DB-Servers and has a value of `0`.
296+
Otherwise, the default value is controlled by the current database's
297+
default `writeConcern`, which uses the `--cluster.write-concern`
298+
startup option as default, which defaults to `1`. _(cluster only)_
293299
type: integer
294300
shardingStrategy:
295301
description: |
@@ -306,7 +312,7 @@ paths:
306312
distributeShardsLike:
307313
description: |
308314
The name of another collection. This collection uses the `replicationFactor`,
309-
`numberOfShards` and `shardingStrategy` properties of the other collection and
315+
`numberOfShards`, `shardingStrategy`, and `writeConcern` properties of the other collection and
310316
the shards of this collection are distributed in the same way as the shards of
311317
the other collection.
312318
type: string
@@ -1180,13 +1186,19 @@ paths:
11801186
in the cluster, a shard refuses to write. Writes to shards with enough
11811187
up-to-date copies succeed at the same time, however. The value of
11821188
`writeConcern` cannot be greater than `replicationFactor`.
1189+
1190+
If `distributeShardsLike` is set, the `writeConcern`
1191+
is that of the prototype collection.
11831192
For SatelliteCollections, the `writeConcern` is automatically controlled to
1184-
equal the number of DB-Servers and has a value of `0`. _(cluster only)_
1193+
equal the number of DB-Servers and has a value of `0`.
1194+
Otherwise, the default value is controlled by the current database's
1195+
default `writeConcern`, which uses the `--cluster.write-concern`
1196+
startup option as default, which defaults to `1`. _(cluster only)_
11851197
type: integer
11861198
shardingStrategy:
11871199
description: |
11881200
This attribute specifies the name of the sharding strategy to use for
1189-
the collection. Since ArangoDB 3.4 there are different sharding strategies
1201+
the collection. There are different sharding strategies
11901202
to select from when creating a new collection. The selected `shardingStrategy`
11911203
value remains fixed for the collection and cannot be changed afterwards.
11921204
This is important to make the collection keep its sharding settings and
@@ -1217,7 +1229,7 @@ paths:
12171229
distributeShardsLike:
12181230
description: |
12191231
The name of another collection. If this property is set in a cluster, the
1220-
collection copies the `replicationFactor`, `numberOfShards` and `shardingStrategy`
1232+
collection copies the `replicationFactor`, `numberOfShards`, `shardingStrategy`, and `writeConcern`
12211233
properties from the specified collection (referred to as the _prototype collection_)
12221234
and distributes the shards of this collection in the same way as the shards of
12231235
the other collection. In an Enterprise Edition cluster, this data co-location is
@@ -1435,8 +1447,14 @@ paths:
14351447
in the cluster, a shard refuses to write. Writes to shards with enough
14361448
up-to-date copies succeed at the same time, however. The value of
14371449
`writeConcern` cannot be greater than `replicationFactor`.
1450+
1451+
If `distributeShardsLike` is set, the `writeConcern`
1452+
is that of the prototype collection.
14381453
For SatelliteCollections, the `writeConcern` is automatically controlled to
1439-
equal the number of DB-Servers and has a value of `0`. _(cluster only)_
1454+
equal the number of DB-Servers and has a value of `0`.
1455+
Otherwise, the default value is controlled by the current database's
1456+
default `writeConcern`, which uses the `--cluster.write-concern`
1457+
startup option as default, which defaults to `1`. _(cluster only)_
14401458
type: integer
14411459
shardingStrategy:
14421460
description: |
@@ -1453,7 +1471,7 @@ paths:
14531471
distributeShardsLike:
14541472
description: |
14551473
The name of another collection. This collection uses the `replicationFactor`,
1456-
`numberOfShards` and `shardingStrategy` properties of the other collection and
1474+
`numberOfShards`, `shardingStrategy`, and `writeConcern` properties of the other collection and
14571475
the shards of this collection are distributed in the same way as the shards of
14581476
the other collection.
14591477
type: string
@@ -2120,8 +2138,14 @@ paths:
21202138
in the cluster, a shard refuses to write. Writes to shards with enough
21212139
up-to-date copies succeed at the same time, however. The value of
21222140
`writeConcern` cannot be greater than `replicationFactor`.
2141+
2142+
If `distributeShardsLike` is set, the `writeConcern`
2143+
is that of the prototype collection.
21232144
For SatelliteCollections, the `writeConcern` is automatically controlled to
2124-
equal the number of DB-Servers and has a value of `0`. _(cluster only)_
2145+
equal the number of DB-Servers and has a value of `0`.
2146+
Otherwise, the default value is controlled by the current database's
2147+
default `writeConcern`, which uses the `--cluster.write-concern`
2148+
startup option as default, which defaults to `1`. _(cluster only)_
21252149
type: integer
21262150
responses:
21272151
'400':

site/content/3.10/develop/http-api/databases.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,13 @@ paths:
240240
in the cluster, a shard refuses to write. Writes to shards with enough
241241
up-to-date copies succeed at the same time, however. The value of
242242
`writeConcern` cannot be greater than `replicationFactor`.
243+
244+
If `distributeShardsLike` is set, the `writeConcern`
245+
is that of the prototype collection.
243246
For SatelliteCollections, the `writeConcern` is automatically controlled to
244-
equal the number of DB-Servers and has a value of `0`. _(cluster only)_
247+
equal the number of DB-Servers and has a value of `0`.
248+
Otherwise, the default value is controlled by the `--cluster.write-concern`
249+
startup option, which defaults to `1`. _(cluster only)_
245250
type: number
246251
users:
247252
description: |

site/content/3.10/develop/javascript-api/@arangodb/collection-object.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ In a cluster setup, the result also contains the following attributes:
266266

267267
- `distributeShardsLike` (string):
268268
The name of another collection. This collection uses the `replicationFactor`,
269-
`numberOfShards` and `shardingStrategy` properties of the other collection and
269+
`numberOfShards`, `shardingStrategy`, `writeConcern` properties of the other collection and
270270
the shards of this collection are distributed in the same way as the shards of
271271
the other collection.
272272

site/content/3.10/develop/javascript-api/@arangodb/db-object.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ error is thrown. For information about the naming constraints for collections, s
392392

393393
- `distributeShardsLike` (string, _optional_, default: `""`):
394394
The name of another collection. If this property is set in a cluster, the
395-
collection copies the `replicationFactor`, `numberOfShards` and `shardingStrategy`
395+
collection copies the `replicationFactor`, `numberOfShards`, `shardingStrategy`, and `writeConcern`
396396
properties from the specified collection (referred to as the _prototype collection_)
397397
and distributes the shards of this collection in the same way as the shards of
398398
the other collection. In an Enterprise Edition cluster, this data co-location is

site/content/3.11/develop/http-api/collections.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,14 @@ paths:
288288
in the cluster, a shard refuses to write. Writes to shards with enough
289289
up-to-date copies succeed at the same time, however. The value of
290290
`writeConcern` cannot be greater than `replicationFactor`.
291+
292+
If `distributeShardsLike` is set, the `writeConcern`
293+
is that of the prototype collection.
291294
For SatelliteCollections, the `writeConcern` is automatically controlled to
292-
equal the number of DB-Servers and has a value of `0`. _(cluster only)_
295+
equal the number of DB-Servers and has a value of `0`.
296+
Otherwise, the default value is controlled by the current database's
297+
default `writeConcern`, which uses the `--cluster.write-concern`
298+
startup option as default, which defaults to `1`. _(cluster only)_
293299
type: integer
294300
shardingStrategy:
295301
description: |
@@ -306,7 +312,7 @@ paths:
306312
distributeShardsLike:
307313
description: |
308314
The name of another collection. This collection uses the `replicationFactor`,
309-
`numberOfShards` and `shardingStrategy` properties of the other collection and
315+
`numberOfShards`, `shardingStrategy`, and `writeConcern` properties of the other collection and
310316
the shards of this collection are distributed in the same way as the shards of
311317
the other collection.
312318
type: string
@@ -1180,8 +1186,14 @@ paths:
11801186
in the cluster, a shard refuses to write. Writes to shards with enough
11811187
up-to-date copies succeed at the same time, however. The value of
11821188
`writeConcern` cannot be greater than `replicationFactor`.
1189+
1190+
If `distributeShardsLike` is set, the `writeConcern`
1191+
is that of the prototype collection.
11831192
For SatelliteCollections, the `writeConcern` is automatically controlled to
1184-
equal the number of DB-Servers and has a value of `0`. _(cluster only)_
1193+
equal the number of DB-Servers and has a value of `0`.
1194+
Otherwise, the default value is controlled by the current database's
1195+
default `writeConcern`, which uses the `--cluster.write-concern`
1196+
startup option as default, which defaults to `1`. _(cluster only)_
11851197
type: integer
11861198
shardingStrategy:
11871199
description: |
@@ -1217,7 +1229,7 @@ paths:
12171229
distributeShardsLike:
12181230
description: |
12191231
The name of another collection. If this property is set in a cluster, the
1220-
collection copies the `replicationFactor`, `numberOfShards` and `shardingStrategy`
1232+
collection copies the `replicationFactor`, `numberOfShards`, `shardingStrategy`, and `writeConcern`
12211233
properties from the specified collection (referred to as the _prototype collection_)
12221234
and distributes the shards of this collection in the same way as the shards of
12231235
the other collection. In an Enterprise Edition cluster, this data co-location is
@@ -1435,8 +1447,14 @@ paths:
14351447
in the cluster, a shard refuses to write. Writes to shards with enough
14361448
up-to-date copies succeed at the same time, however. The value of
14371449
`writeConcern` cannot be greater than `replicationFactor`.
1450+
1451+
If `distributeShardsLike` is set, the `writeConcern`
1452+
is that of the prototype collection.
14381453
For SatelliteCollections, the `writeConcern` is automatically controlled to
1439-
equal the number of DB-Servers and has a value of `0`. _(cluster only)_
1454+
equal the number of DB-Servers and has a value of `0`.
1455+
Otherwise, the default value is controlled by the current database's
1456+
default `writeConcern`, which uses the `--cluster.write-concern`
1457+
startup option as default, which defaults to `1`. _(cluster only)_
14401458
type: integer
14411459
shardingStrategy:
14421460
description: |
@@ -1453,7 +1471,7 @@ paths:
14531471
distributeShardsLike:
14541472
description: |
14551473
The name of another collection. This collection uses the `replicationFactor`,
1456-
`numberOfShards` and `shardingStrategy` properties of the other collection and
1474+
`numberOfShards`, `shardingStrategy`, and `writeConcern` properties of the other collection and
14571475
the shards of this collection are distributed in the same way as the shards of
14581476
the other collection.
14591477
type: string
@@ -2120,8 +2138,14 @@ paths:
21202138
in the cluster, a shard refuses to write. Writes to shards with enough
21212139
up-to-date copies succeed at the same time, however. The value of
21222140
`writeConcern` cannot be greater than `replicationFactor`.
2141+
2142+
If `distributeShardsLike` is set, the `writeConcern`
2143+
is that of the prototype collection.
21232144
For SatelliteCollections, the `writeConcern` is automatically controlled to
2124-
equal the number of DB-Servers and has a value of `0`. _(cluster only)_
2145+
equal the number of DB-Servers and has a value of `0`.
2146+
Otherwise, the default value is controlled by the current database's
2147+
default `writeConcern`, which uses the `--cluster.write-concern`
2148+
startup option as default, which defaults to `1`. _(cluster only)_
21252149
type: integer
21262150
responses:
21272151
'400':

site/content/3.11/develop/http-api/databases.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,13 @@ paths:
240240
in the cluster, a shard refuses to write. Writes to shards with enough
241241
up-to-date copies succeed at the same time, however. The value of
242242
`writeConcern` cannot be greater than `replicationFactor`.
243+
244+
If `distributeShardsLike` is set, the `writeConcern`
245+
is that of the prototype collection.
243246
For SatelliteCollections, the `writeConcern` is automatically controlled to
244-
equal the number of DB-Servers and has a value of `0`. _(cluster only)_
247+
equal the number of DB-Servers and has a value of `0`.
248+
Otherwise, the default value is controlled by the `--cluster.write-concern`
249+
startup option, which defaults to `1`. _(cluster only)_
245250
type: number
246251
users:
247252
description: |

site/content/3.11/develop/javascript-api/@arangodb/collection-object.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ In a cluster setup, the result also contains the following attributes:
266266

267267
- `distributeShardsLike` (string):
268268
The name of another collection. This collection uses the `replicationFactor`,
269-
`numberOfShards` and `shardingStrategy` properties of the other collection and
269+
`numberOfShards`, `shardingStrategy`, `writeConcern` properties of the other collection and
270270
the shards of this collection are distributed in the same way as the shards of
271271
the other collection.
272272

site/content/3.11/develop/javascript-api/@arangodb/db-object.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ error is thrown. For information about the naming constraints for collections, s
392392

393393
- `distributeShardsLike` (string, _optional_, default: `""`):
394394
The name of another collection. If this property is set in a cluster, the
395-
collection copies the `replicationFactor`, `numberOfShards` and `shardingStrategy`
395+
collection copies the `replicationFactor`, `numberOfShards`, `shardingStrategy`, and `writeConcern`
396396
properties from the specified collection (referred to as the _prototype collection_)
397397
and distributes the shards of this collection in the same way as the shards of
398398
the other collection. In an Enterprise Edition cluster, this data co-location is

0 commit comments

Comments
 (0)