sermant-io / Sermant

CNCF sandbox project, a Cloud-Native Proxyless Service Mesh based on Java Bytecode Enhancement Technology
https://sermant.io/
Apache License 2.0
1.25k stars 164 forks source link

When use redis store event, backend send webhook error #1616

Closed AYue-94 closed 1 month ago

AYue-94 commented 2 months ago

What happened?

When using Redis storage, the incorrect key was used to query the InstanceMeta, resulting in empty QueryResultEventInfoEntity and a null pointer during notification. image

How can we reproduce it (as minimally and precisely as possible)?

  1. start agent and send event
  2. start backend use redis
  3. config webhook on backend ui

Anything else we need to know?

No response

Sermant version

2.0.0

OS version

MacOS

lilai23 commented 2 months ago

this issue may happens for addInstanceMeta method use set rather than hset. Since hset can not set expire time for filed, I think we should just use set and get with expire time