4

我有来自 DynamoDB 的运动流。我正在通过 aws KCL sdk v1.14.0 处理它。我在日志中看到以下偶尔出现的错误。我还观察到,对于 dynamodb 租用表中的所有分片,startingHashKey 始终为 1,endingHashKey 始终为 0。任何线索为什么会发生这种情况?

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
  }
}
4

1 回答 1

2

我也收到此错误,但流似乎工作正常。(我用它来监控数据变化)。

然后我挖了这个错误日志的源码,发现部分代码是2020年6月22日添加的,

这是源代码:https ://github.com/awslabs/amazon-kinesis-client/blob/6fbfc21ad7d6a2722491806a411d168304167f7f/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/PeriodicShardSyncManager.java# L298

这是罪魁祸首:https ://github.com/awslabs/amazon-kinesis-client/blame/6fbfc21ad7d6a2722491806a411d168304167f7f/src/main/java/com/amazonaws/services/kinesis/clientlibrary/lib/worker/PeriodicShardSyncManager.java#L298

这是提交:https ://github.com/awslabs/amazon-kinesis-client/commit/3a88a60a4ee7bb8f969b36cb79e7665a7395b6ec

它仅在最新版本中:1.14.0

所以我回到一个版本使用 1.13.3 然后没有这个错误。

我已经在 GitHub 上提交了一个问题,以查看错误的原因。https://github.com/awslabs/amazon-kinesis-client/issues/758

于 2020-11-26T22:10:25.743 回答