Permissions are not applied immediately in Oracle
Related to #9547 When you apply permissions to a user, they are not applied immediately. Logs show “Somewhat slow query” messages. If you wait some time the permissions will eventually get applied, except for Template-Layouts, which will never get applied. Logs show different Errors that follow those “Somewhat slow query” messages. https://gist.github.com/shaydotcms/1207a5537b7f3553fea6553b733d6d5a
Steps to reproduce 1-Navigate to System> Users 2-Go to permissions tab and give full permission to any children (Joe Contributor) 3-Click "Cascade Changes ?” and Apply Changes 4-Go to System> Sites. Click the site and then Permissions tab 5-Click on the user you gave permissions to (Joe Contributor) 6-You will see the permissions are not applied immediately. If you wait some time, the permissions will eventually get applied, except for Template-Layouts, which will never get applied
This issue is not happening in MySQL, where you can see below that permissions are applied immediately.
MySQL: permissions are applied immediately

Oracle: permissions are not applied immediately

Template-Layouts permission is not applied

Tested in master-3.6 // Mac OS 10.10 // Oracle 12c
PR: https://github.com/dotCMS/core/pull/9605
With this fix the job only takes 6 seconds to complete and the error is no longer present.
Great fix, it's starting up very quick. Error is gone. Tested in master-3.6 // Mac OS 10.10 // Oracle 12c