pubsub: Memory growth observed while sending messages with ordering keys #4288
Labels
api: pubsub
Issues related to the Pub/Sub API.
priority: p1
Important issue which blocks shipping the next release. Will be fixed prior to next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Client
PubSub v1.10.1
Environment
Ubuntu 20.04
Go Environment
go 1.16
Expected behavior
memory growth should not be observed while sending messages using transient
ordering keys
(ordering keys which have a limited life span)Actual behavior
Memory growth is observed while sending messages using
Topic.Publish
method with ordering keys. Attaching the proof report image. It looks like the mapss.bundlers
ands.outstanding
of PublishScheduler are growing.Should the increment of outstanding
s.outstanding[key]++
be done when thekey
is found in the map only as it is already initialised to1
when it is not found in the map.google-cloud-go/pubsub/internal/scheduler/publish_scheduler.go
Line 147 in 71c0469
The text was updated successfully, but these errors were encountered: