Skip to content

Commit

Permalink
[Claim] Add arrival time to Stream Record batch (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomerShor authored Dec 20, 2023
1 parent 25cbc31 commit 89672a9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 7 additions & 5 deletions pkg/dataplane/streamconsumergroup/claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,13 @@ func (c *claim) fetchRecordBatch(location string) (string, error) {

for receivedRecordIndex, receivedRecord := range getRecordsOutput.Records {
record := v3io.StreamRecord{
ShardID: &c.shardID,
Data: receivedRecord.Data,
ClientInfo: receivedRecord.ClientInfo,
PartitionKey: receivedRecord.PartitionKey,
SequenceNumber: receivedRecord.SequenceNumber,
ShardID: &c.shardID,
Data: receivedRecord.Data,
ClientInfo: receivedRecord.ClientInfo,
PartitionKey: receivedRecord.PartitionKey,
SequenceNumber: receivedRecord.SequenceNumber,
ArrivalTimeSec: receivedRecord.ArrivalTimeSec,
ArrivalTimeNSec: receivedRecord.ArrivalTimeNSec,
}

records[receivedRecordIndex] = record
Expand Down
12 changes: 7 additions & 5 deletions pkg/dataplane/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,13 @@ type GetItemsOutput struct {
//

type StreamRecord struct {
ShardID *int
Data []byte
ClientInfo []byte
PartitionKey string
SequenceNumber uint64
ShardID *int
Data []byte
ClientInfo []byte
PartitionKey string
SequenceNumber uint64
ArrivalTimeSec int
ArrivalTimeNSec int
}

type SeekShardInputType int
Expand Down

0 comments on commit 89672a9

Please sign in to comment.