mhart / kinesalite

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

ability to disable shard limits #92

Closed parisholley closed 5 years ago

parisholley commented 5 years ago

When keeping a local server running over an extended period of time, and generating a lot of single-use streams (for test isolation), enforcing a limit becomes problematic. Allow the user to set shardLimit = 0 (to disable).

mhart commented 5 years ago

Does --shardLimit Infinity work currently?

parisholley commented 5 years ago

Assuming the accepted answer here is correct:

https://stackoverflow.com/questions/7781260/how-can-i-represent-an-infinite-number-in-python

No, because we'd need to either parse the CLI argument always as a float (thus allowing 'Inf' as a string), or explicitly coercing a string value to Math.inf

mhart commented 5 years ago

Sorry, you're saying it doesn't work? The post you linked to is about Python (this is written in JS)

parisholley commented 5 years ago

hah, you are right, i've been staring at localstack code too long, appears to work with infinity (perhaps document or consider making default)

mhart commented 5 years ago

Yeah, will document – I kinda want the defaults to match production (to a degree) so that ppl are aware of issues they can run into.