]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw/notification: For kafka include user-id & password as part of the key along with... 62495/head
authorkchheda3 <kchheda3@bloomberg.net>
Thu, 23 May 2024 20:20:05 +0000 (16:20 -0400)
committerkchheda3 <kchheda3@bloomberg.net>
Tue, 25 Mar 2025 13:52:28 +0000 (13:52 +0000)
commit82b385aef86128a0187c3b49e213a20893e8ff85
tree84a117870ed079007017485e8f68afd7b9d39c5e
parent1b8380605df3ac50a9d12ada9dbfb2b1271b49db
rgw/notification: For kafka include user-id & password as part of the key along with endpoint for connection pooling.

For kafka, currently connection pooling is done based on endpoint, so all the events with same endpoint share the same connection. but there are issues when userid & password is created/changed for the endpoint, coz the old connection is cached in broker manager and when new event with updated/new userid-password is sent, broker still uses the old connection that was created with old/no userid/password as currently only the `endpoint` is the key to connection pool.
To fix this, use all the topic attributes that are part of connection as the key to connection pool and if any of the attribute changes create new kafka connection. Attibutes include userid, password, ssl, ca_laction.

Signed-off-by: kchheda3 <kchheda3@bloomberg.net>
src/rgw/driver/rados/rgw_pubsub_push.cc
src/rgw/rgw_kafka.cc
src/rgw/rgw_kafka.h
src/test/rgw/bucket_notification/test_bn.py