WIP: Add URI filtering
Hello Kirill,
with neoppod!18 (comment 184671) it was decided to implement zurl filtering on wcfs.py
side:
Instead, I think, it makes more sense to implement zurl filtering on wcfs.py side and to remove options like
ca
,read_only
,connection_cache_size
etc - options that do not change the meaning of which database a zurl refers. This way wcfs problem will be solved, even if not in ideal way.
(Kirill Smelkov, 2023/05/24)
This MR aims to take this decision into action. Because neoppod!18 (closed) is still in process, we may want to wait with dropping client options. Nevertheless we can already proceed with proving a better base to finally apply the filtering:
-
In my view it improves understandability and readability if we move WCFS mountpoint calculation and attached filtering to a dedicated lib module.
-
We can also apply tests to this new module, which makes problems straight, early and isolated visible. It's also needed to ensure new more complex filter work.
Furthermore we can use this new base to apply patches for problems which are also related to zodburi filtering, but aren't related to neoppod!18 (closed):
-
AFAIK the URI scheme of NEO doesn't specify in which order the master node addresses are sorted. This means if we have two clients which point to the same NEO cluster, but which use a different order of the master node addresses in their URI, they won't connect to the same WCFS mntpt. So we either specify how master node addresses need to be sorted or we re-sort them when calculating the WCFS URI. I prefer the later, because the specification would need to be applied to many different code bits and it adds much more complexity to the specification of the NEO URI (and therefore makes bug more likely to happen).
-
Once (3) is solved, we can also teach
zstor_2zuri
to build NEO URI with more than one master node, because their order doesn't matter anymore.
Could you please review this @kirr? Thanks and
Best, Levin