Repository navigation
Fix performance issue by changingthe key format of the id cache in posix fs - #602
Conversation
We currently keep a list of plain base32 encoded paths in the cache in order to map paths to file ids. That is a problem when a subtree is deleted or moved because we have to scan the whole list to find the relevant entries. The new approach makes use of nats hierarchical keys instead. Paths are split at the path separator, then each of the segments is base32 encoded and finally a key is compiled by joining the segments with '.'s. The dot notation enables us to use a nats watcher and query for all entries that belong to a subtree using a wildcard much more efficiently.
89b5ebe to
2ce0596
Compare
|
Now the woodpecker linter doesn't the yaml anymore.
|
|
Yes, the linter complains but it still works.. nats comes up properly now despite the linter warning: The tests are still failing with some timeouts, though. Looks like maybe the connection to nats doesn't work properly... 🙄 |
The |
Fixed in woodpecker-ci/woodpecker#6487 |
We currently keep a list of plain base32 encoded paths in the cache in order to map paths to file ids. That is a problem when a subtree is deleted or moved because we have to scan the whole list to find the relevant entries.
The new approach makes use of nats hierarchical keys instead. Paths are split at the path separator, then each of the segments is base32 encoded and finally a key is compiled by joining the segments with '.'s. The dot notation enables us to use a nats watcher and query for all entries that belong to a subtree using a wildcard much more efficiently.