8000 findAcls doesn't return partial result when some acls are retrieved from cache · Issue #9515 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

findAcls doesn't return partial result when some acls are retrieved from cache #9515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
superdav42 opened this issue Nov 15, 2013 · 0 comments

Comments

@superdav42
Copy link
Contributor

I've been testing acls with the provided AclCache (Symfony\Component\Security\Acl\Domain\DoctrineAclCache) and I ran into some problems. In Symfony\Component\Security\Acl\Dbal\AclProvider::findAcls the function will behave differently using the cache when not using the cache. When the cache is empty in my use case it throws NotAllAclsFoundException with a partial result set which I can use. If items are in the cache it throws the AclNotFoundException which doesn't have a partial result I can use.

This happens because it calls lookupObjectIdentities with the items that were not found in the cache and it throws the exception AclNotFoundException which isn't caught.

fabpot added a commit that referenced this issue Nov 22, 2013
…eturned from cache (superdav42)

This PR was merged into the 2.2 branch.

Discussion
----------

[AclProvider] Fix incorrect behavior when partial results returned from cache

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #9515
| License       | MIT
| Doc PR        | none

[AclProvider] Fix incorrect behavior when partial results returned from cache

findAcls wasn't throwing the NotAllAclsFoundException with the partial result when some acls were retrieved from the cache. This will fix that behavior. Ideally we would update it to cache items that were not found so it wouldn't have to query the db every time for non existent items, but I'm not sure if that is possible.
I'm not sure if the ACL cache is being used very much, I didn't find any docs about it but it seems to work except for this issue. It might be more appropriate to merge the fix in master if no one is relying on it to work in 2.2.

Commits
-------

edae59c [AclProvider] Fix incorrect behaviour when partial results returned from cache
@fabpot fabpot closed this as completed Nov 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0