Giter Club home page Giter Club logo

Comments (6)

doanduyhai avatar doanduyhai commented on July 28, 2024 1

so we don't even need a keyspace_to_lock column but only one

Yes correct. In this case to block schema change on the whole cluster, you need to use the consistency SERIAL instead of LOCAL_SERIAL for your LWT

from evolve.

doanduyhai avatar doanduyhai commented on July 28, 2024

Instead of creating/deleting the keyspace, you can just create a keyspace (ingenico_schema_change) and a table (lock) with the following schema:

CREATE TABLE lock(
   keyspace_to_lock text PRIMARY KEY
)

Before each topology change, do an INSERT with a TTL on this table (TTL value should be long enough to cover the duration of the topology change)

After the topology change, you issue an DELETE to remove the lock

from evolve.

Pvlerick avatar Pvlerick commented on July 28, 2024

@doanduyhai ok, got it, thanks. One last question: any replication factor or consistency level advice on this?

from evolve.

doanduyhai avatar doanduyhai commented on July 28, 2024

Standard replication factor of 3 should be fine.

For operations on lock/unlock since you're using LightWeightTransaction, the only choice of Consistency Level is LOCAL_SERIAL or SERIAL

LOCAL_SERIAL allows your lock operation to survive a crash of a whole datacenter.
SERIAL allows your lock operation to span across the cluster because it requires strict majority of replica on all data centers

from evolve.

Pvlerick avatar Pvlerick commented on July 28, 2024

Ok. Now, I was under the impression that this lock would be for the whole cluster - I guess what we want is to block any structural change in any keyspace in the cluster when the topology changes, so we don't even need a keyspace_to_lock column but only one.

In short, this table will contain a single record when a topology change is in progress (so no migration should occur) and no record when it is safe to migrate. Is that correct?

from evolve.

lecaillon avatar lecaillon commented on July 28, 2024

@Pvlerick Is this always an openned issue ?

from evolve.

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.