Git Product home page Git Product logo

Comments (4)

vietj avatar vietj commented on June 1, 2024

I can see that too, can you elaborate how the control flow changes by setting the status to closed when the channel inactive is set first @kkoderok ?

from vertx-sql-client.

kkoderok avatar kkoderok commented on June 1, 2024

As I can see, when a connection is closed, the method PgCodec#fail completes query execution future with exception, by calling ctx.fireChannelRead(failure). This result leads to rollback of current transaction in the withTransaction method. The PgSocketConnection has no disconnection status, so it sends rollback command. In this case we add ClosePortalCommandCodec in the deque (PgCodec.inflight), but current iterator doesn't notice this command.
If we change call order, rollback request will be immediately failed with exception by PgSocketConnection.

from vertx-sql-client.

vietj avatar vietj commented on June 1, 2024

thanks , I missed the rollback

from vertx-sql-client.

vietj avatar vietj commented on June 1, 2024

thanks for the reproducer and analysis, the codec classes should actually record the failure and fail new command registered against the codec, so in response of the failure, the rollback command will be fail immediately by the codec. Your suggestion was also correct, but relying on the timing instead on the failed state that should be recorded to prevent execution of the pipeline for new commands.

from vertx-sql-client.

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.