node_acl icon indicating copy to clipboard operation
node_acl copied to clipboard

Max mongo document size

Open ezefire opened this issue 7 years ago • 2 comments

Hi, We noticed that the collection 'roles' adds the user id to the document of its rol. But on mongo there is a max size for each document and adding every userId to that same document could cause that document arrives to that max size. The same happens in the collection 'meta' where all user ids are stored under the same document.

ezefire avatar Aug 01 '18 11:08 ezefire

Actually met this issue in our production database, screen shot 2018-12-31 at 12 24 14 pm

There are too many roles, and met MongoError Resulting document after update is larger than 16777216 when we trying to add more roles

timqian avatar Dec 31 '18 04:12 timqian

A simple temp solution worked for us without changing the code is removing roles in the large meta document. roles in the big document is used to remove all the permissions associated to ONE resource when removing resource. ref1; ref2; So, with this solution, the issue is we will have unnecessary permissions still in db when resource got deleted.

timqian avatar Jan 14 '19 06:01 timqian