Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Collision check cache metadata is not updated #28

Open
splushii opened this issue Sep 11, 2019 · 0 comments
Open

Collision check cache metadata is not updated #28

splushii opened this issue Sep 11, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@splushii
Copy link

If a rule is moved from one file to another or changes description the cache entry will not be updated because the cache entries are only keyed by fsm_cache_key = domain + str(match_tree). We have two alternatives:

  • Key by all metadata values used in the cache entries (domain, match_tree, file path and description)
  • Update cache entry metadata (file path, description)

The first solution is a bit simpler, but the second one is more performant (because then we don't need to calculate a new FSM every time the rule changes file / description / other metadata)

To reproduce:

  1. Run ORM with collision checking and caching
  2. Move a rule from one file to another
  3. Invoke a collision with the moved rule
  4. Run ORM with collision checking and caching (and see the faulty metadata in the output)
@splushii splushii added the bug Something isn't working label Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Development

No branches or pull requests

1 participant