Comments (8)
Hi,
With the current implementation I would say that the tested behavior is the implemented one. The semantics of currentEventsByTag
in the current implementation is a bit different from the one of LevelDB backend. Events occurring after source opening may be seen by the source due to how event retrieval is implemented. The implementation buffers events and closes the source when no events are found in the database when refilling buffer.
I agree this brings less guarantees to the user and may lead to apparently strange behaviors.
It should be possible to implement the same semantic than the LevelDB backend, and I will investigate how this can be achieved. In any way, documentation should be more explicit about the behavior.
Thanks for reporting.
from akka-persistence-redis.
All known implementations of Current*
queries (LevelDb, Cassandra, Jdbc) fetch a data from a storage only once. Otherwise, it would be something like live query
from akka-persistence-redis.
Not necessarily, you can retrieve data in batch up to a certain point in time (say request time). You canβt always (or even wish to) load all events into memory at once. E.g. you might want to keep the memory footprint as low as possible.
from akka-persistence-redis.
I investigated and there is an easy way to implement the same semantics as for LevelDB, I will work on it ASAP.
from akka-persistence-redis.
I've found the same problem for CurrentEventsByPersistenceId
query
from akka-persistence-redis.
Yes, I implemented all the Current*
streams the same way and will change their semantics.
from akka-persistence-redis.
I see the similar issue in return remaining values after partial journal cleanup test. You have requested two items but should have requested only one item. The current stream should be completed right after delivering the whole buffer. Maybe you should change this line https://github.com/safety-data/akka-persistence-redis/blob/master/src/main/scala/akka/persistence/query/journal/redis/EventsByPersistenceIdSource.scala#L213 to if (buffer.isEmpty && (currentSequenceNr > to || !live))
from akka-persistence-redis.
Yes it seems this condition is missing. I will perform a rewriting and complete review of implementation and tests.
from akka-persistence-redis.
Related Issues (19)
- Publish on maven central
- Unexpected source state when querying: 2 HOT 2
- Problem with eventsByPersistenceId using large sequence number ranges HOT 4
- ScalaReadJournal cannot be instantiated in a test HOT 1
- Only call stage method in callback
- Using sentinel config fails with journal queries HOT 4
- What is the difference between hootsuite/akka-persistence-redis ? HOT 8
- Plugin always connects to localhost HOT 6
- Publish scaladoc
- bump to akkaVersion = "2.5.17" ? HOT 3
- why is it always looking for localhost ? HOT 7
- persistent query reader as competing consumer HOT 1
- Add support for scala 2.13.0
- Documentation akka.persistence.snapshot.plugin HOT 1
- Add support for sentinel server
- redis.actors.ReplyErrorException: NOAUTH Authentication required.
- upgrade akka version HOT 2
- tagsKey set is not used anywhere
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 akka-persistence-redis.