Dynamodb stream kinesis - Incomplete hash range found between

1.6k views Asked by At

I have kinesis stream from DynamoDB. And I am processing it through aws KCL sdk v1.14.0. I see below occasional errors in the logs. I also observe that startingHashKey is always 1 and endingHashKey is 0 for all shards in the dynamodb lease table. Any clue why is this happening?

Incomplete hash range found between {
  "leaseKey" : "shardId-00000001601992582645-697387df",
  "leaseOwner" : "eu01-stg01-vendor-service-74b4cd66b6-6hcfb:29dafc2f-c87f-4c70-b210-d38db7ebfc87",
  "leaseCounter" : 4080,
  "concurrencyToken" : null,
  "lastCounterIncrementNanos" : null,
  "checkpoint" : {
    "sequenceNumber" : "47515300000000010794885359",
    "subSequenceNumber" : 0,
    "shardEnd" : false
  },
  "pendingCheckpoint" : null,
  "ownerSwitchesSinceCheckpoint" : 0,
  "parentShardIds" : [ ],
  "childShardIds" : [ ],
  "hashKeyRange" : {
    "startingHashKey" : 0,
    "endingHashKey" : 1
  }
} and {
  "leaseKey" : "shardId-00000001602005637902-6358a08a",
  "leaseOwner" : "eu01-stg01-vendor-service-74b4cd66b6-6hcfb:29dafc2f-c87f-4c70-b210-d38db7ebfc87",
  "leaseCounter" : 397,
  "concurrencyToken" : null,
  "lastCounterIncrementNanos" : null,
  "checkpoint" : {
    "sequenceNumber" : "TRIM_HORIZON",
    "subSequenceNumber" : 0,
    "shardEnd" : false
  },
  "pendingCheckpoint" : null,
  "ownerSwitchesSinceCheckpoint" : 0,
  "parentShardIds" : [ "shardId-00000001601992582736-2c3fc0ff" ],
  "childShardIds" : [ ],
  "hashKeyRange" : {
    "startingHashKey" : 0,
    "endingHashKey" : 1
  }
}
1

There are 1 answers

1
Xin Meng On BEST ANSWER

I also get this error, but the stream seems to work properly. (I am using it to monitor the data change).

Then I dig the source code of this error log, find the part code is added on Jun 22, 2020,

This is the source code: https://github.com/awslabs/amazon-kinesis-client/blob/6fbfc21ad7d6a2722491806a411d168304167f7f/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/PeriodicShardSyncManager.java#L298

This is the blame: https://github.com/awslabs/amazon-kinesis-client/blame/6fbfc21ad7d6a2722491806a411d168304167f7f/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/PeriodicShardSyncManager.java#L298

This is the commit: https://github.com/awslabs/amazon-kinesis-client/commit/3a88a60a4ee7bb8f969b36cb79e7665a7395b6ec

it is only in the latest version: 1.14.0

So I go back one version to use 1.13.3 then no this error.

I have submitted an issue on the GitHub to see what the reason for the error. https://github.com/awslabs/amazon-kinesis-client/issues/758