GithubHelp home page GithubHelp logo

vtadmin-demo-data-insert's Introduction

vtadmin-demo-data-insert

data inserter tool for vtadmin reshard demo

Usage:

First, build this with go build.

In the local example (vitess.io/vitess/examples/local):

  • run scripts ./101_initial_cluster.sh up through ./302_new_shards.sh
  • in a second pane, run ./scripts/vtadmin-up.sh, which will spawn vtadmin-web running on localhost:3000 in your browser.
  • navigate to http://localhost:3000/workflows, and you should see no workflows running.
  • in a third pane, run this tool, with whichever batch-size/threads/sleep-interval params you wish.
    • for example, i was using ./vtadmin-demo-insert-data -threads 16 -batch_size 500 -sleep 100ms.
  • back in your first terminal pane, run ./303_reshard.sh. this starts the workflow.
  • back in your browser, you should see a new workflow, called cust2cust. if you click on it you'll see 2 streams, both in Copy phase. Depending on how long you were running the data-inserter, they might be in Copy phase for a long time
  • eventually, you will see those streams transition (live!) to Running phase. now you can run VDiff:
    • vtctlclient -server "localhost:15999" VDiff -source_cell "zone1" -target_cell "zone1" customer.cust2cust
    Summary for table corder:
        ProcessedRows: 0
        MatchingRows: 0
        MismatchedRows: 0
        ExtraRowsSource: 0
        ExtraRowsTarget: 0
    Summary for table customer:
        ProcessedRows: 2659669
        MatchingRows: 2659669
        MismatchedRows: 0
        ExtraRowsSource: 0
        ExtraRowsTarget: 0
  • Assuming all rows matched, you can finish the migration:
    • ./304_switch_reads.sh
    • ./305_switch_writes.sh
  • At this point, vtadmin will show the streams in Stopped phase (because the reverse vreplication are technically part of a separate workflow from vtadmin's perspective, but they are definitely running)
  • That's all folks!

vtadmin-demo-data-insert's People

Contributors

ajm188 avatar doeg avatar

Watchers

James Cloos avatar  avatar

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.