Hi,
I’m facing issues with some large documents that have this format:
"members": [<user_name_1>, ..., <user_name_n"],
"type": "group"
I create a channel for each group-document and allow access for each user that is listed in the members-array.
There is one document that contains about 1500 members and therefore grants lots of doc accesses resulting in this warning
access and role grants count: 1462 exceeds 50 for grants per doc warning threshold
This is what i get from the admin-api:
GET /{db}/_all_docs access=true channels=true
{
"rows": [
{
"key": "test.group:test_channel",
"id": "test.group:test_channel",
"value": {
"rev": "1-49feb57cd8dbf4fe5a8ebf3645bd1814",
"channels": [
"group:test_channel"
],
"access": {
"testmail@couchbase.de": [
"group:test_channel"
],
... 1462 access-objects
}
}
},
{
"key": "org.couchbase.user:testmail@couchbase.de",
"id": "org.couchbase.user:testmail@couchbase.de",
"value": {
"rev": "1-f9e1af0746a1f8b2520d214d1a47fea1",
"channels": [
"user:testmail@couchbase.de"
],
"access": {
"testmail@couchbase.de": [
"user:testmail@couchbase.de"
]
}
}
},
.... other group-channels
],
"total_rows": 4,
"update_seq": 8
}
My user “testmail@couchbase.de” has access to the channel “group:test_channel” and to his private user-document channel.
However the public api delivers another response as you can see here:
GET /{db}/_all_docs access=true channels=true
{
"rows": [
{
"key": "org.couchbase.user:testmail@couchbase.de",
"id": "org.couchbase.user:testmail@couchbase.de",
"value": {
"rev": "1-f9e1af0746a1f8b2520d214d1a47fea1",
"channels": [
"user:testmail@couchbase.de"
]
}
}
],
"total_rows": 2,
"update_seq": 8
}
The “group:test_channel” is missing and therefore i cannot see documents that are in this channel. This issue only occurs with this large group-document - 45k. I have tried different database configurations by setting enable_shared_bucket_access to false and to true, but it does not solve my issue. I don’t think that my metadata size exceeds the limit of 1MB or 20MB (depending on shared-bucket config).
This is my database config:
'test': {
server: 'couchbase://server',
bucket: 'test',
username: '***'',
password: '***',
enable_shared_bucket_access: false,
num_index_replicas: 0,
users: {
GUEST: {
disabled: true,
admin_channels: [],
},
},
allow_conflicts: true,
revs_limit: 20,
sync,
},
}
Any hints whats wrong? Does this conecpt of group-documents play well with couchbase? How can I debug such issues?
Thanks