Open ezefire opened 6 years ago
Actually met this issue in our production database,
There are too many roles, and met MongoError Resulting document after update is larger than 16777216
when we trying to add more roles
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.
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.