Reset permissions for doctypes containing more than 1 million documents

Hello community. Our server is pretty powerful, and we gave it some pretty good innodb_lock_timeout etc configs, yet nothing happens when we use Role Permissions and add a new rule. What can do at this point to change permissions for all the documents (more than a million) inside the doctype?

Thank you :slight_smile: