zenoh icon indicating copy to clipboard operation
zenoh copied to clipboard

Downsampling don't work with wildcards in key expression

Open sashacmc opened this issue 1 year ago • 0 comments

Describe the bug

Seems that the method weight_at from the KeyExprTree works only with key expression without wildcards, it should be replaced with something other. https://github.com/eclipse-zenoh/zenoh/blob/2500e5a62d8940cbfbc36f27c07360f91ba28c2d/zenoh/src/net/routing/interceptor/downsampling.rs#L125

To reproduce

Run z_pub in router mode Run z_sub in client mode with config

      "downsampling": [
          {
              "flow": "ingress",
              "rules": [
                  {
                      "freq": 0.1,
                      "key_expr": "demo/**"
                  }
              ]
          },
      ],

Downsampling not work.

When replacing demo/** with demo/example/zenoh-rs-pub everything works as expected

System info

Any platform

sashacmc avatar Jun 28 '24 09:06 sashacmc