mhart / kinesalite

An implementation of Amazon's Kinesis built on LevelDB
MIT License
808 stars 86 forks source link

Error when GetShardIterator by timestamp #94

Open lisashizhu opened 5 years ago

lisashizhu commented 5 years ago

When calling GetShardIterator by timestamp, it is struck and times out so that we could not get http response.

Version used:

v3.1.0 --> kinesalite v2.0 --> .net standard v3.3.100.80 --> AWSSDK.Kinesis

Reproduce steps

1. Build Docker image

FROM instructure/node:10
MAINTAINER Instructure

ENV DATADIR /var/lib/kinesalite

USER root
RUN mkdir $DATADIR && chown docker:docker $DATADIR
USER docker

RUN npm install kinesalite@3.1.0

EXPOSE 4567
VOLUME $DATADIR

ENTRYPOINT ["/tini", "--", "/usr/src/app/node_modules/kinesalite/cli.js", "--path", "/var/lib/kinesalite"]

2. Deploy and run it in Docker 3. Use kinesis consumer written by .net standard to call Kinesis service. AWS Document:https://docs.aws.amazon.com/sdkfornet/v3/apidocs/ Code reference : https://sachabarbs.wordpress.com/2018/09/17/aws-kinesis/ (please refer Consumer Data Streams API part) 3.1 call DescribeStreamAsync 3.2 call GetShardIteratorAsync with timestamp --> ERROR

Expected result

By the time GetShardIteratorAsync is called with timestamp there is no stream yet in Kinesis service. However it should still return shard iterator without any records inside.

Actual result

When calling GetShardIterator by timestamp, it is struck and times out(after around 1 min,) so we could not get http response.