Skip to content

Commit 1acfced

Browse files
committed
hide PublicErrCommitSessionToExpiredSession for async commit mode
1 parent 70b0beb commit 1acfced

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/topic/topicreaderinternal/stream_reader_impl.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,12 @@ func (r *topicStreamReaderImpl) onPartitionSessionStatusResponseFromBuffer(
329329
}
330330

331331
func (r *topicStreamReaderImpl) Commit(ctx context.Context, commitRange commitRange) (err error) {
332+
defer func() {
333+
if errors.Is(err, PublicErrCommitSessionToExpiredSession) && r.cfg.CommitMode == CommitModeAsync {
334+
err = nil
335+
}
336+
}()
337+
332338
if commitRange.partitionSession == nil {
333339
return xerrors.WithStackTrace(errCommitWithNilPartitionSession)
334340
}

0 commit comments

Comments
 (0)