2025-12-12T11:57:11.105048Z :DEBUG: [local]  TraceId []  SessionId []  MessageGroupId [test-message_group_id] Write session: try to update token
2025-12-12T11:57:11.105329Z :INFO: [local]  TraceId []  SessionId []  MessageGroupId [test-message_group_id] Start write session. Will connect to nodeId: 0
2025-12-12T11:57:11.111330Z :DEBUG: [local]  TraceId []  SessionId []  MessageGroupId [test-message_group_id] Write session: write to message_group: test-message_group_id
2025-12-12T11:57:11.111377Z :DEBUG: [local]  TraceId []  SessionId []  MessageGroupId [test-message_group_id] Write session: send init request: init_request { path: "sdk_tests/BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight/test-topic" producer_id: "test-message_group_id" message_group_id: "test-message_group_id" }
2025-12-12T11:57:11.111501Z :DEBUG: [local]  TraceId []  SessionId []  MessageGroupId [test-message_group_id] Write session: OnWriteDone gRpcStatusCode: 0
2025-12-12T11:57:11.119001Z :DEBUG: [local]  TraceId []  SessionId []  MessageGroupId [test-message_group_id] Write session: OnReadDone gRpcStatusCode: 0
2025-12-12T11:57:11.119027Z :INFO: [local]  TraceId []  SessionId []  MessageGroupId [test-message_group_id] Counters: { Errors: 0 CurrentSessionLifetimeMs: 1765540631119 BytesWritten: 0 MessagesWritten: 0 BytesWrittenCompressed: 0 BytesInflightUncompressed: 0 BytesInflightCompressed: 0 BytesInflightTotal: 0 MessagesInflight: 0 }
2025-12-12T11:57:11.119061Z :INFO: [local]  TraceId []  SessionId []  MessageGroupId [test-message_group_id] Write session established. Init response: session_id: "test-message_group_id|77fb09c4-3e370383-9f7cc375-d1413d97_0"
2025-12-12T11:57:11.119068Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|77fb09c4-3e370383-9f7cc375-d1413d97_0]  MessageGroupId [test-message_group_id] Write session: set DirectWriteToPartitionId 0
2025-12-12T11:57:11.119103Z :INFO: [local]  TraceId []  SessionId [test-message_group_id|77fb09c4-3e370383-9f7cc375-d1413d97_0]  PartitionId [0]  Generation [0] Get partition location async, partition 0, delay 0.000000s
2025-12-12T11:57:11.119157Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|77fb09c4-3e370383-9f7cc375-d1413d97_0]  PartitionId [0]  Generation [0]  Getting partition location, partition 0
2025-12-12T11:57:11.120856Z :INFO: [local]  TraceId []  SessionId [test-message_group_id|77fb09c4-3e370383-9f7cc375-d1413d97_0]  PartitionId [0]  Generation [0] Got PartitionLocation response. Status SUCCESS, proto:
partition {
  active: true
  partition_location {
    node_id: 1
    generation: 1
  }
}
2025-12-12T11:57:11.120870Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|77fb09c4-3e370383-9f7cc375-d1413d97_0]  PartitionId [0]  Generation [0] GetPreferredEndpoint: partitionId 0, partitionNodeId 1 exists in the endpoint pool.
2025-12-12T11:57:11.120877Z :INFO: [local]  TraceId []  SessionId [test-message_group_id|77fb09c4-3e370383-9f7cc375-d1413d97_0]  PartitionId [0]  Generation [1] Start write session. Will connect to nodeId: 1
2025-12-12T11:57:11.121228Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|77fb09c4-3e370383-9f7cc375-d1413d97_0]  PartitionId [0]  Generation [1] Write session: OnReadDone gRpcStatusCode: 1, Msg: CANCELLED, Details: , InternalError: 0
2025-12-12T11:57:11.121398Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|77fb09c4-3e370383-9f7cc375-d1413d97_0]  PartitionId [0]  Generation [1] Write session: direct write to partition: 0, generation 1
2025-12-12T11:57:11.121429Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|77fb09c4-3e370383-9f7cc375-d1413d97_0]  PartitionId [0]  Generation [1] Write session: send init request: init_request { path: "sdk_tests/BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight/test-topic" producer_id: "test-message_group_id" partition_with_generation { generation: 1 } }
2025-12-12T11:57:11.121553Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|77fb09c4-3e370383-9f7cc375-d1413d97_0]  PartitionId [0]  Generation [1] Write session: OnWriteDone gRpcStatusCode: 0
2025-12-12T11:57:11.127750Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|77fb09c4-3e370383-9f7cc375-d1413d97_0]  PartitionId [0]  Generation [1] Write session: OnReadDone gRpcStatusCode: 0
2025-12-12T11:57:11.127799Z :INFO: [local]  TraceId []  SessionId [test-message_group_id|77fb09c4-3e370383-9f7cc375-d1413d97_0]  PartitionId [0]  Generation [1] Write session established. Init response: session_id: "test-message_group_id|cf6394f4-9df84895-d0577dec-23884db8_0"
2025-12-12T11:57:11.127804Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|cf6394f4-9df84895-d0577dec-23884db8_0]  PartitionId [0]  Generation [1] Write session: set DirectWriteToPartitionId 0
2025-12-12T11:57:11.127865Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|cf6394f4-9df84895-d0577dec-23884db8_0]  PartitionId [0]  Generation [1] Write 1 messages with Id from 1 to 1
2025-12-12T11:57:11.127906Z :INFO: [local]  TraceId []  SessionId [test-message_group_id|cf6394f4-9df84895-d0577dec-23884db8_0]  PartitionId [0]  Generation [1] Write session: close. Timeout 10.000000s
2025-12-12T11:57:11.128072Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|cf6394f4-9df84895-d0577dec-23884db8_0]  PartitionId [0]  Generation [1] Write session: try to update token
2025-12-12T11:57:11.128092Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|cf6394f4-9df84895-d0577dec-23884db8_0]  PartitionId [0]  Generation [1] Send 1 message(s) (0 left), first sequence number is 1
2025-12-12T11:57:11.129940Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|cf6394f4-9df84895-d0577dec-23884db8_0]  PartitionId [0]  Generation [1] Write session: OnReadDone gRpcStatusCode: 0
2025-12-12T11:57:11.129997Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|cf6394f4-9df84895-d0577dec-23884db8_0]  PartitionId [0]  Generation [1] Write session got write response: acks { seq_no: 1 written { } } write_statistics { persisting_time { nanos: 1000000 } min_queue_wait_time { } max_queue_wait_time { } partition_quota_wait_time { } topic_quota_wait_time { } }
2025-12-12T11:57:11.130005Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|cf6394f4-9df84895-d0577dec-23884db8_0]  PartitionId [0]  Generation [1] OnAck: seqNo=1, txId=?
2025-12-12T11:57:11.130012Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|cf6394f4-9df84895-d0577dec-23884db8_0]  PartitionId [0]  Generation [1] Write session: acknoledged message 1
2025-12-12T11:57:11.227972Z :INFO: [local]  TraceId []  SessionId [test-message_group_id|cf6394f4-9df84895-d0577dec-23884db8_0]  PartitionId [0]  Generation [1] Write session will now close
2025-12-12T11:57:11.228006Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|cf6394f4-9df84895-d0577dec-23884db8_0]  PartitionId [0]  Generation [1] Write session: aborting
2025-12-12T11:57:11.228354Z :INFO: [local]  TraceId []  SessionId [test-message_group_id|cf6394f4-9df84895-d0577dec-23884db8_0]  PartitionId [0]  Generation [1] Write session: gracefully shut down, all writes complete
2025-12-12T11:57:11.228372Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|cf6394f4-9df84895-d0577dec-23884db8_0]  PartitionId [0]  Generation [1] Write session: OnReadDone gRpcStatusCode: 1, Msg: CANCELLED, Details: , InternalError: 0
2025-12-12T11:57:11.228388Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|cf6394f4-9df84895-d0577dec-23884db8_0]  PartitionId [0]  Generation [1] Write session is aborting and will not restart
>>>TEST: future read has no value 
>>>TEST in RunTasks: before WaitPlannedTasks
2025-12-12T11:57:11.228548Z :INFO: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] Starting read session
2025-12-12T11:57:11.228562Z :DEBUG: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] Starting single session
2025-12-12T11:57:11.228700Z :DEBUG: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] [] In Reconnect, ReadSizeBudget = 524288, ReadSizeServerDelta = 0
2025-12-12T11:57:11.228705Z :DEBUG: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] [] New values: ReadSizeBudget = 524288, ReadSizeServerDelta = 0
2025-12-12T11:57:11.228709Z :DEBUG: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] [] Reconnecting session to cluster  in 0.000000s
2025-12-12T11:57:11.228962Z :DEBUG: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] [] Successfully connected. Initializing session
2025-12-12T11:57:11.229823Z :INFO: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] [] Got InitResponse. ReadSessionId: BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1
2025-12-12T11:57:11.229845Z :DEBUG: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] [] In ContinueReadingDataImpl, ReadSizeBudget = 524288, ReadSizeServerDelta = 0
2025-12-12T11:57:11.229922Z :DEBUG: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] [] After sending read request: ReadSizeBudget = 0, ReadSizeServerDelta = 524288
>>>TEST in RunTasks: before WaitExecutedTasks
2025-12-12T11:57:11.328608Z :INFO: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] [] Confirm partition stream create. Partition stream id: 1. Cluster: "-". Topic: "sdk_tests/BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight/test-topic". Partition: 0. Read offset: (NULL)
2025-12-12T11:57:11.328859Z :DEBUG: [local] 0x00005287FF755710 TDirectReadSessionManager ServerSessionId=BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1 StartPartitionSession 1 nodeId=1
2025-12-12T11:57:11.328891Z :DEBUG: [local] 0x00005287FF6089A0 TDirectReadSession ServerSessionId=BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1 NodeId=1 Reconnecting direct read session to node 1 in 0.000000s
2025-12-12T11:57:11.329136Z :DEBUG: [local] 0x00005287FF6089A0 TDirectReadSession ServerSessionId=BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1 NodeId=1 Successfully connected. Initializing session
2025-12-12T11:57:11.329184Z :DEBUG: [local] 0x00005287FF6089A0 TDirectReadSession ServerSessionId=BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1 NodeId=1 XXXXX subsession send message = init_request { session_id: "BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1" topics_read_settings { path: "sdk_tests/BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight/test-topic" } consumer: "BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer" }
2025-12-12T11:57:11.329689Z :DEBUG: [local] 0x00005287FF6089A0 TDirectReadSession ServerSessionId=BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1 NodeId=1 AddPartitionSession 1
2025-12-12T11:57:11.329701Z :DEBUG: [local] 0x00005287FF6089A0 TDirectReadSession ServerSessionId=BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1 NodeId=1 SendStartRequestImpl partitionSession.State=0 delayedCall=0
2025-12-12T11:57:11.329706Z :DEBUG: [local] 0x00005287FF6089A0 TDirectReadSession ServerSessionId=BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1 NodeId=1 SendStartRequestImpl bail out 1
2025-12-12T11:57:11.330051Z :DEBUG: [local] 0x00005287FF6089A0 TDirectReadSession ServerSessionId=BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1 NodeId=1 XXXXX subsession got message = status: SUCCESS init_response { }
2025-12-12T11:57:11.330068Z :DEBUG: [local] 0x00005287FF6089A0 TDirectReadSession ServerSessionId=BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1 NodeId=1 Got InitResponse 
2025-12-12T11:57:11.330072Z :DEBUG: [local] 0x00005287FF6089A0 TDirectReadSession ServerSessionId=BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1 NodeId=1 SendStartRequestImpl partitionSession.State=0 delayedCall=0
2025-12-12T11:57:11.330085Z :DEBUG: [local] 0x00005287FF6089A0 TDirectReadSession ServerSessionId=BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1 NodeId=1 SendStartRequestImpl send request start_direct_read_partition_session_request { partition_session_id: 1 generation: 1 }
2025-12-12T11:57:11.330096Z :DEBUG: [local] 0x00005287FF6089A0 TDirectReadSession ServerSessionId=BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1 NodeId=1 XXXXX subsession send message = start_direct_read_partition_session_request { partition_session_id: 1 generation: 1 }
2025-12-12T11:57:11.330537Z :DEBUG: [local] 0x00005287FF6089A0 TDirectReadSession ServerSessionId=BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1 NodeId=1 XXXXX subsession got message = status: SUCCESS start_direct_read_partition_session_response { partition_session_id: 1 generation: 1 }
2025-12-12T11:57:11.330556Z :DEBUG: [local] 0x00005287FF6089A0 TDirectReadSession ServerSessionId=BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1 NodeId=1 Got StartDirectReadPartitionSessionResponse partition_session_id: 1 generation: 1
2025-12-12T11:57:11.330631Z :DEBUG: [local] 0x00005287FF6089A0 TDirectReadSession ServerSessionId=BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1 NodeId=1 XXXXX subsession got message = DirectReadResponse partitionSessionId = 1 partitionId = 0 directReadId = 1 firstOffset = 0 lastOffset = 0
2025-12-12T11:57:11.330636Z :DEBUG: [local] 0x00005287FF6089A0 TDirectReadSession ServerSessionId=BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1 NodeId=1 Waiting for NextDirectReadId=1. Got DirectReadResponse 1
2025-12-12T11:57:11.330765Z :DEBUG: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] [] Got ReadResponse, serverBytesSize = 190, now ReadSizeBudget = 0, ReadSizeServerDelta = 524098
2025-12-12T11:57:11.330797Z :DEBUG: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] [] In ContinueReadingDataImpl, ReadSizeBudget = 0, ReadSizeServerDelta = 524098
2025-12-12T11:57:11.330883Z :DEBUG: [local] Decompression task done. Partition/PartitionSessionId: 1 (0-0)
2025-12-12T11:57:11.330909Z :DEBUG: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] [] Returning serverBytesSize = 190 to budget
2025-12-12T11:57:11.330915Z :DEBUG: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] [] In ContinueReadingDataImpl, ReadSizeBudget = 190, ReadSizeServerDelta = 524098
2025-12-12T11:57:11.331014Z :DEBUG: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] [] After sending read request: ReadSizeBudget = 0, ReadSizeServerDelta = 524288
2025-12-12T11:57:11.331034Z :DEBUG: [local] Take Data. Partition 0. Read: {0, 0} (0-0)
>>>TEST in RunTasks: before WaitPlannedTasks
>>>TEST in RunTasks: before WaitExecutedTasks
>>>TEST: in SimpleDataHandlers 
2025-12-12T11:57:11.428764Z :DEBUG: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] [] Commit offsets [0, 1). Partition stream id: 1
2025-12-12T11:57:11.428947Z :DEBUG: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] [] The application data is transferred to the client. Number of messages 1, size 2000 bytes
2025-12-12T11:57:11.428963Z :DEBUG: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] [] Returning serverBytesSize = 0 to budget
2025-12-12T11:57:11.428971Z :INFO: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] Closing read session. Close timeout: 10.000000s
2025-12-12T11:57:11.428994Z :INFO: [local] Read/commit by partition streams (cluster:topic:partition:stream-id:read-offset:committed-offset): -:sdk_tests/BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight/test-topic:0:1:0:0
2025-12-12T11:57:11.429004Z :INFO: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] Counters: { Errors: 0 CurrentSessionLifetimeMs: 200 BytesRead: 2000 MessagesRead: 1 BytesReadCompressed: 35 BytesInflightUncompressed: 0 BytesInflightCompressed: 0 BytesInflightTotal: 0 MessagesInflight: 0 }
2025-12-12T11:57:11.429190Z :DEBUG: [local] 0x00005287FF755710 TDirectReadSessionManager ServerSessionId=BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1 Close
2025-12-12T11:57:11.429229Z :DEBUG: [local] 0x00005287FF755710 TDirectReadSessionManager ServerSessionId=BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight-test-consumer_1_9_17249843223596298230_v1 Close
2025-12-12T11:57:11.429272Z :INFO: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] Closing read session. Close timeout: 0.000000s
2025-12-12T11:57:11.429278Z :INFO: [local] Read/commit by partition streams (cluster:topic:partition:stream-id:read-offset:committed-offset): -:sdk_tests/BasicUsage-DirectRead_SessionNotDestroyedWhileUserEventHandlingInFlight/test-topic:0:1:0:0
2025-12-12T11:57:11.429283Z :INFO: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] Counters: { Errors: 0 CurrentSessionLifetimeMs: 200 BytesRead: 2000 MessagesRead: 1 BytesReadCompressed: 35 BytesInflightUncompressed: 0 BytesInflightCompressed: 0 BytesInflightTotal: 0 MessagesInflight: 0 }
2025-12-12T11:57:11.429298Z :NOTICE: [local] [local] [e8a9b1d1-5f76af68-4c4e2585-b0965aa5] Aborting read session. Description: SessionClosed { Status: ABORTED Issues: "<main>: Error: Aborted " }
>>>TEST: read promise set 
>>>TEST: future read has value 
>>> TEST: gracefully closed
2025-12-12T11:57:11.528794Z :DEBUG: [local]  TraceId []  SessionId [test-message_group_id|cf6394f4-9df84895-d0577dec-23884db8_0]  PartitionId [0]  Generation [1] Write session: destroy
