Giter VIP home page Giter VIP logo

Comments (5)

octonato avatar octonato commented on May 28, 2024

Hi @vpavkin,

After some research, I have the impression that the error is on the plugin side.

I see the following on their source:

  def eventsByTag(tag: String, offset: Long): Query[Journal, JournalRow, Seq] =
    JournalTable.filter(_.tags like s"%$tag%").sortBy(_.created.asc).drop(offset)

  def eventsByTagAndPersistenceId(persistenceId: String, tag: String, offset: Long): Query[Journal, JournalRow, Seq] =
    JournalTable
       .filter(_.persistenceId === persistenceId)
       .filter(_.tags like s"%$tag%")
       .sortBy(_.sequenceNumber.asc)
       .filter(_.sequenceNumber >= offset)

In eventsByTag, they drop everything up to the offset (offset included).

In eventsByTagAndPersistenceId, they retain everything with sequenceNumber >= offset, thus offset included in the result.

The second is aligned with LevelDB and Cassandra plugin (and with our internal Postgres plugin as well).

The problem is that the query documentation is lacking and we don't have a TestKit yet.

Maybe @dnvriend can shed some light here.

from fun-cqrs.

vpavkin avatar vpavkin commented on May 28, 2024

@rcavalcanti Sorry for being silent for some time. I see what you mean, definitely makes sense.
I agree that the main problem here is the lack of precise persistent query spec. Thanks for digging the truth! :)

Luckily, a workaround here is rather simple. Feel free to close this issue. 👍

from fun-cqrs.

octonato avatar octonato commented on May 28, 2024

Hi @vpavkin,

I won't close this issue for the moment as I want to investigate better what are the plans for the query API. I want to investigate it further before reaching the Akka team.

from fun-cqrs.

vpavkin avatar vpavkin commented on May 28, 2024

hi @rcavalcanti.
Just upgraded my project to FunCQRS 0.4.6 and akka-persistence-jdbc 2.5.2.
Bug doesn't seem to reproduce any more.

from fun-cqrs.

octonato avatar octonato commented on May 28, 2024

Hi @vpavkin,

Nothing was added to on Fun.CQRS with respect to that. I think the fix comes from akka-persistence-jdbc 2.5.2.

I have saw some tweets from @dnvriend with the akka team discussing about the TestKit for akka persistence query. He may get involved with it.

I'll close this issue therefore.

from fun-cqrs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.