Comments (13)
Bizarre error! But have reproduced no problem, thanks.
I'll look into it!
from kinesalite.
Oh right – I see, it's because you're trying to reuse the same kinesalite instance.
If you change this so that you create a new kinesalite instance each time it should work fine.
I'm not entirely sure that trying to reuse an instance once it's been closed should be a supported feature – it would mean hacking into the listen
method and re-initializing the levelup database, etc – and listen
isn't really a synonym for open
so I don't think this is semantically correct.
I'll definitely make the error reporting a little nicer though.
from kinesalite.
Yeah the use-case is slightly odd, but common if you're using kinesalite in tests and you want to start fresh between individual tests.
I've been running tests like this with dynalite for some time, reusing the same instance. Is there a difference there?
from kinesalite.
@rclark there isn't a difference as of architect/dynalite#30
The problem is that close
really should close everything, including the database – this is especially important when using an on-disk leveldb instance. To re-open the database, you need to create a new instance.
from kinesalite.
Didn't realise that a patch release would break this use case, so sorry about that! Problem is it's exploiting a bug that existed in the first place 😸
from kinesalite.
Problem is it's exploiting a bug that existed in the first place
Totally fair. I guess it wouldn't be possible to detect and explicitly fail on reuse unless you hijack the listen
method?
from kinesalite.
Yep, that's what I'm doing 👍
from kinesalite.
Going with Instance has been closed, please create a new instance to listen again
– sound ok?
from kinesalite.
Now that I'm looking at patching listen
... I mean... I'm considering just recreating the store... 😈
I'll give it a quick test, and if it works maybe I'll just do it... If there are issues down the track with it, then can look at throwing an error instead.
from kinesalite.
Ok – so the only issue I've run into is with the 0 millisecond timeouts you're using on your create stream calls, etc.
Basically, I use setTimeout
no matter what – so even with a 0 millisecond timeout, it can try to read/write after the database has closed.
I'm considering that a separate issue which I might try to patch
from kinesalite.
Ok, so I relented 😸 – you should be able to keep using it as-is. Hopefully I haven't opened a can of worms! Don't really think so though...
from kinesalite.
Released as v1.4.3
from kinesalite.
Also fixed in dynalite, released as v0.11.3 – thanks for the report!
from kinesalite.
Related Issues (20)
- SerializationException thrown when CBOR is enabled in java client
- Invalid base64
- Kinesalite not allowing colon character in tags, though AWS does allow
- Json Unmarshal Exception with AWS java SDK 2.X HOT 3
- Kinesalite allows splitting the same shard multiple times
- kinesis object read from stream have different capitalization than Kinesis
- Does not work with @aws-sdk/client-kinesis (v3) HOT 3
- Reading from kinesalite stream works, but writing to it fails with security token invalid error message HOT 4
- Inaccessible host localhost error when calling the createStream method and using NodeJS 16
- Failed to disable certificate validation, KCL with Kinesalite ssl enabled
- Logstash kinesis-input-plugin with kinesis lite?
- kinesis get-shard-iterator --shard-iterator-type AT_TIMESTAMP not return response HOT 3
- npm audit security report level-sublevel HOT 1
- Amount of shards are always 0 HOT 2
- High cpu
- Error when GetShardIterator by timestamp
- UnknownOperationException thrown by Java AWS SDK during ShardSyncTask HOT 1
- server-crt.pem file is expired
- Creating streams takes rather long HOT 2
- Implement NextToken/MaxRecords for ListShards
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kinesalite.