Coder Social home page Coder Social logo

BZPop bug about dragonfly HOT 6 OPEN

adiholden avatar adiholden commented on July 20, 2024
BZPop bug

from dragonfly.

Comments (6)

romange avatar romange commented on July 20, 2024

We should not put private links in our public repo (for security considerations).

from dragonfly.

BorysTheDev avatar BorysTheDev commented on July 20, 2024

@adiholden @romange I have found only one possible issue. We have 2 steps:

  1. Check key presence
  2. trans->execute()
    During 2nd step we lock db_slice::cb_mu_ and can preempt so if the key is removed we will execute a transaction with a deprecated iterator.
    This bug should be fixed by #3229

from dragonfly.

BorysTheDev avatar BorysTheDev commented on July 20, 2024

I haven't found using of cluster, replication but the save operation happened on July 10, 2024 2:59:31 PM (GMT)

from dragonfly.

BorysTheDev avatar BorysTheDev commented on July 20, 2024

I've found one more bug with KEY_MOVE error and have fixed it #3334

But it looks like we have at least one more

from dragonfly.

BorysTheDev avatar BorysTheDev commented on July 20, 2024

I haven't found the real reason for this bug, but it looks like the execution order was next:

  1. run trans->WaitOnWatch(...)
  2. run trans->CancelBlocking(...)
    2.1) Transaction::coordinator_state_ |= COORD_CANCELLED;
    2.2) Transaction::local_result_ = status; // where status != OK
  3. Transaction::local_result_ somehow should be set OK
  4. trans->WaitOnWatch(..) returns Transaction::local_result_ // that is already OK

The problem is that I don't see how the 3rd step can happen.
Also, it looks like the 2nd step was done from the connection closing code:

  owner->RegisterBreakHook([res, this](uint32_t) {
    if (res->transaction)
      res->transaction->CancelBlocking(nullptr);
    this->server_family().BreakOnShutdown();
  });

from dragonfly.

romange avatar romange commented on July 20, 2024

ok, how can you prove that 2 has happened, and it was due to RegisterBreakHook?

from dragonfly.

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.