Skip to content
This repository was archived by the owner on Dec 13, 2023. It is now read-only.

Commit 1bea48d

Browse files
authored
Merge branch 'main' into feature/query-iso-week-year
2 parents fe60c3a + 8dc9054 commit 1bea48d

12 files changed

+72
-12
lines changed

3.10/administration-cluster.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,12 @@ UPDATE "123" WITH { … } IN sharded_collection
118118
```
119119

120120
If custom shard keys are used, you can no longer specify the primary key value
121-
for a new document, but must let the server generated one automatically. This
121+
for a new document, but must let the server generate one automatically. This
122122
restriction comes from the fact that ensuring uniqueness of the primary key
123123
would be very inefficient if the user could specify the document key.
124+
If custom shard keys are used, trying to store documents with the primary key value
125+
(`_key` attribute) set will result in a runtime error ("must not specify _key
126+
for this collection").
124127

125128
Unique indexes on sharded collections are only allowed if the fields used to
126129
determine the shard key are also included in the list of attribute paths for the index:

3.10/indexing-index-basics.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,17 @@ by ArangoDB, without the user being required to create extra indexes for them.
2323
`_id` and `_key` are covered by a collection's primary key, and `_from` and `_to`
2424
are covered by an edge collection's edge index automatically.
2525

26-
Using the system attribute `_id` in user-defined indexes is not possible, but
27-
indexing `_key`, `_rev`, `_from`, and `_to` is.
26+
You cannot use the `_id` system attribute in user-defined indexes, but indexing
27+
`_key`, `_rev`, `_from`, and `_to` is possible.
28+
29+
You cannot index fields that contain `.` in their attribute names because dots
30+
are interpreted as paths of nested attributes. For example, `fields: ["foo.bar"]`
31+
indexes the value of the nested attribute `bar` under the top-level attribute
32+
`foo` (`{ "foo": { "bar": "value" } }`) and not a top-level attribute
33+
`foo.bar` (`{ "foo.bar": "value" }`).
34+
35+
You can also not index fields whose names either start or end with `:`, for
36+
example, `fields: ["foo:"]`. This notation is reserved for internal use.
2837

2938
Creating new indexes is by default done under an exclusive collection lock. The collection is not
3039
available while the index is being created. This "foreground" index creation can be undesirable,

3.11/administration-cluster.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,12 @@ UPDATE "123" WITH { … } IN sharded_collection
118118
```
119119

120120
If custom shard keys are used, you can no longer specify the primary key value
121-
for a new document, but must let the server generated one automatically. This
121+
for a new document, but must let the server generate one automatically. This
122122
restriction comes from the fact that ensuring uniqueness of the primary key
123123
would be very inefficient if the user could specify the document key.
124+
If custom shard keys are used, trying to store documents with the primary key value
125+
(`_key` attribute) set will result in a runtime error ("must not specify _key
126+
for this collection").
124127

125128
Unique indexes on sharded collections are only allowed if the fields used to
126129
determine the shard key are also included in the list of attribute paths for the index:

3.11/indexing-index-basics.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,17 @@ by ArangoDB, without the user being required to create extra indexes for them.
2323
`_id` and `_key` are covered by a collection's primary key, and `_from` and `_to`
2424
are covered by an edge collection's edge index automatically.
2525

26-
Using the system attribute `_id` in user-defined indexes is not possible, but
27-
indexing `_key`, `_rev`, `_from`, and `_to` is.
26+
You cannot use the `_id` system attribute in user-defined indexes, but indexing
27+
`_key`, `_rev`, `_from`, and `_to` is possible.
28+
29+
You cannot index fields that contain `.` in their attribute names because dots
30+
are interpreted as paths of nested attributes. For example, `fields: ["foo.bar"]`
31+
indexes the value of the nested attribute `bar` under the top-level attribute
32+
`foo` (`{ "foo": { "bar": "value" } }`) and not a top-level attribute
33+
`foo.bar` (`{ "foo.bar": "value" }`).
34+
35+
You can also not index fields whose names either start or end with `:`, for
36+
example, `fields: ["foo:"]`. This notation is reserved for internal use.
2837

2938
Creating new indexes is by default done under an exclusive collection lock. The collection is not
3039
available while the index is being created. This "foreground" index creation can be undesirable,

3.11/release-notes-api-changes311.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ integrations for ArangoDB 3.11.
2929

3030
### Endpoints augmented
3131

32+
#### Restriction of indexable fields
3233

34+
It is now forbidden to create indexes that cover fields whose attribute names
35+
start or end with `:` , for example, `fields: ["value:"]`. This notation is
36+
reserved for internal use.
37+
38+
Existing indexes are not affected but you cannot create new indexes with a
39+
preceding or trailing colon using the `POST /_api/index` endpoint.
3340

3441
### Endpoints moved
3542

3.11/release-notes-upgrading-changes311.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,12 @@ upgrading to ArangoDB 3.11, and adjust any client programs if necessary.
1010

1111
The following incompatible changes have been made in ArangoDB 3.11:
1212

13+
Restriction of indexable fields
14+
-------------------------------
15+
16+
It is now forbidden to create indexes that cover fields whose attribute names
17+
start or end with `:` , for example, `fields: ["value:"]`. This notation is
18+
reserved for internal use.
19+
20+
Existing indexes are not affected but you cannot create new indexes with a
21+
preceding or trailing colon.

3.8/administration-cluster.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,12 @@ UPDATE "123" WITH { … } IN sharded_collection
118118
```
119119

120120
If custom shard keys are used, you can no longer specify the primary key value
121-
for a new document, but must let the server generated one automatically. This
121+
for a new document, but must let the server generate one automatically. This
122122
restriction comes from the fact that ensuring uniqueness of the primary key
123123
would be very inefficient if the user could specify the document key.
124+
If custom shard keys are used, trying to store documents with the primary key value
125+
(`_key` attribute) set will result in a runtime error ("must not specify _key
126+
for this collection").
124127

125128
Unique indexes (hash, skiplist, persistent) on sharded collections are
126129
only allowed if the fields used to determine the shard key are also

3.8/indexing-index-basics.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,14 @@ by ArangoDB, without the user being required to create extra indexes for them.
2323
`_id` and `_key` are covered by a collection's primary key, and `_from` and `_to`
2424
are covered by an edge collection's edge index automatically.
2525

26-
Using the system attribute `_id` in user-defined indexes is not possible, but
27-
indexing `_key`, `_rev`, `_from`, and `_to` is.
26+
You cannot use the `_id` system attribute in user-defined indexes, but indexing
27+
`_key`, `_rev`, `_from`, and `_to` is possible.
28+
29+
You cannot index fields that contain `.` in their attribute names because dots
30+
are interpreted as paths of nested attributes. For example, `fields: ["foo.bar"]`
31+
indexes the value of the nested attribute `bar` under the top-level attribute
32+
`foo` (`{ "foo": { "bar": "value" } }`) and not a top-level attribute
33+
`foo.bar` (`{ "foo.bar": "value" }`).
2834

2935
Creating new indexes is by default done under an exclusive collection lock. The collection is not
3036
available while the index is being created. This "foreground" index creation can be undesirable,

3.8/release-notes-known-issues38.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ AQL
3232
| **Date Added:** 2018-09-05 <br> **Component:** AQL <br> **Deployment Mode:** Cluster <br> **Description:** In a very uncommon edge case there is an issue with an optimization rule in the cluster. If you are running a cluster and use a custom shard key on a collection (default is `_key`) **and** you provide a wrong shard key in a modifying query (`UPDATE`, `REPLACE`, `DELETE`) **and** the wrong shard key is on a different shard than the correct one, a `DOCUMENT NOT FOUND` error is returned instead of a modification (example query: `UPDATE { _key: "123", shardKey: "wrongKey"} WITH { foo: "bar" } IN mycollection`). Note that the modification always happens if the rule is switched off, so the suggested workaround is to [deactivate the optimizing rule](aql/execution-and-performance-optimizer.html#turning-specific-optimizer-rules-off) `restrict-to-single-shard`. <br> **Affected Versions:** 3.4.x, 3.5.x, 3.6.x, 3.7.x, 3.8.x <br> **Fixed in Versions:** - <br> **Reference:** [arangodb/arangodb#6399](https://github.com/arangodb/arangodb/issues/6399){:target="_blank"} |
3333
| **Date Added:** 2021-04-19 <br> **Component:** AQL <br> **Deployment Mode:** All <br> **Description:** User-defined variable names in AQL cannot start with an underscore, in contrast to what the AQL documentation claimed. <br> **Affected Versions:** 3.5.x, 3.6.x, 3.7.x, 3.8.x <br> **Fixed in Versions:** 3.9.0 <br> **Reference:** [arangodb/arangodb#13513](https://github.com/arangodb/arangodb/issues/13513){:target="_blank"} |
3434
| **Date Added:** 2021-05-25 <br> **Component:** AQL <br> **Deployment Mode:** All <br> **Description:** Global and per-query memory limits are not enforced for `SHORTEST_PATH` and `K_SHORTEST_PATHS` AQL graph traversals. Such queries may thus cause out-of-memory issues as they will not be killed despite exceeding the configured `--query.memory-limit` or Cursor API `memoryLimit`. <br> **Affected Versions:** 3.5.x, 3.6.x, 3.7.x, 3.8.x <br> **Fixed in Versions:** 3.8.1 <br> **Reference:** [BTS-411](https://arangodb.atlassian.net/browse/BTS-411){:target="_blank"} (internal) |
35+
| **Date Added:** 2022-08-12 <br> **Component:** AQL <br> **Deployment Mode:** Cluster <br> **Description:** Since ArangoDB 3.8, there was a loophole for creating duplicate keys in the same collection. This was only possible in cluster and needed an AQL query that copied over data from a collection (source) into another (target). The target collection must have more than one shard and must use a custom shard key. Inserting documents into the target collection must have happened via an AQL query like `FOR doc IN source INSERT doc INTO target`. In this particular situation, the document keys (`_key` attribute) from the source collection were used as-is for insertion into the target collection. However, as the target collection is not sharded by `_key` and uses a custom shard key, it is actually not allowed to specify user-defined values for `_key`. Versions before 3.8 failed with the error "must not specifiy _key for this collection" when running such an AQL query, but versions between 3.8.0 and 3.8.7 did not. <br> **Affected Versions:** 3.8.0 - 3.8.7 <br> **Fixed in Versions:** 3.8.8 <br> **Reference:** [arangodb/arangodb#16764](https://github.com/arangodb/arangodb/issues/16764){:target="_blank"} |
3536

3637
Upgrading
3738
---------

3.9/administration-cluster.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,12 @@ UPDATE "123" WITH { … } IN sharded_collection
118118
```
119119

120120
If custom shard keys are used, you can no longer specify the primary key value
121-
for a new document, but must let the server generated one automatically. This
121+
for a new document, but must let the server generate one automatically. This
122122
restriction comes from the fact that ensuring uniqueness of the primary key
123123
would be very inefficient if the user could specify the document key.
124+
If custom shard keys are used, trying to store documents with the primary key value
125+
(`_key` attribute) set will result in a runtime error ("must not specify _key
126+
for this collection").
124127

125128
Unique indexes on sharded collections are only allowed if the fields used to
126129
determine the shard key are also included in the list of attribute paths for the index:

0 commit comments

Comments
 (0)