Skip to content

Commit c0e6e9e

Browse files
committed
change confirm, change session info
1 parent 1b18594 commit c0e6e9e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

examples/topic/topicreader/topicreader_handler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ func (h *TopicEventsHandler) OnStopPartitionSessionRequest(
7676
event topiclistener.StopPartitionSessionRequest,
7777
) error {
7878
h.m.Lock()
79-
lockID := h.locks[event.PartitionSessionID]
80-
delete(h.locks, event.PartitionSessionID)
79+
lockID := h.locks[event.PartitionSession.PartitionSessionID]
80+
delete(h.locks, event.PartitionSession.PartitionSessionID)
8181
h.m.Unlock()
8282

8383
err := unlockPartition(ctx, lockID)

internal/topic/topiclistenerinternal/event_handler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ func (e *PublicStartPartitionSessionEvent) Confirm(opts ...PublicStartPartitionS
7171
//
7272
// Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental
7373
type PublicStartPartitionSessionConfirm struct {
74-
ReadOffset *int64
74+
readOffset *int64
7575
CommitOffset *int64 ``
7676
}
7777

7878
// WithReadOffet
7979
//
8080
// Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental
8181
func (c PublicStartPartitionSessionConfirm) WithReadOffet(val int64) PublicStartPartitionSessionConfirm {
82-
c.ReadOffset = &val
82+
c.readOffset = &val
8383
return c
8484
}
8585

internal/topic/topiclistenerinternal/stream_listener.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,8 @@ func (l *streamListener) onStartPartitionRequest(ctx context.Context, m *rawtopi
264264
// pass
265265
}
266266

267-
if userResp.ReadOffset != nil {
268-
resp.ReadOffset.Offset = rawtopicreader.NewOffset(*userResp.ReadOffset)
267+
if userResp.readOffset != nil {
268+
resp.ReadOffset.Offset = rawtopicreader.NewOffset(*userResp.readOffset)
269269
resp.ReadOffset.HasValue = true
270270
}
271271
if userResp.CommitOffset != nil {

0 commit comments

Comments
 (0)