Skip to content

pubsub: mod ack deadline request context deadline setting at 60 seconds is too high in v1.23.1 #6316

@vinoblade

Description

@vinoblade

Client

Pubsub

Environment

GKE

Go Environment

hzhang4@C02F34L4MD6R hubert % go version
go version go1.18 darwin/amd64
hzhang4@C02F34L4MD6R hubert % go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/hzhang4/Library/Caches/go-build"
GOENV="/Users/hzhang4/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/hzhang4/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/hzhang4/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/opt/go/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.18"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/hzhang4/go/src/github.sc-corp.net/Snapchat/hubert/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/yv/y4dw11vx02s2739ktqdz1z6r0000gn/T/go-build1742512841=/tmp/go-build -gno-record-gcc-switches -fno-common"

Problem
In go/pubsub v1.23.1 the context deadline of mod ack deadline request is increased to 60 seconds from 2 seconds. In the case of high tail latency of such requests, the latency can be over 50 seconds. This will block message processing in the subscriber. I suggest making the context deadline configurable so users can configure based their use cases and environment. https://github.com/googleapis/google-cloud-go/blob/main/pubsub/iterator.go#L422

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the Pub/Sub API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions