Details
-
Bug
-
Resolution: Fixed
-
Critical
-
7.0.0, 7.1.0, 7.2.0
-
Security Level: Public
-
Untriaged
-
0
-
Unknown
Description
For Eventing we seem to only support a max of 30 characters for the collection component of the keyspace.
If I create a bucket "a" scope "myscope" collection "collection-a123456789b123456789c123456789d123456789e123456789" the collection name is 62 character long (I should be able to make it 251 characters long as per https://docs.couchbase.com/server/current/learn/data/scopes-and-collections.html)
Now if I make an eventing function as follows:
function OnUpdate(doc, meta) {
|
log("Doc created/updated", meta.id, "writing 'new_doc'"); |
src_col["new_doc"] = { "a": 1 }; |
}
|
With a bucket alias src_col set to the keyspace a.myscope.collection-a123456789b123456789c123456789d123456789e123456789 in r+w mode
I then deploy the function and create one document in the keyspace KEY "trigger" with data
{"a": 1}The function erroneously writes the data to the wrong collection!
- a._default._default
WORKS (longest collection name seems to be 30 characters).
collection-a123456789b12345678
FAILS
collection-a123456789b123456789