Code Monkey home page Code Monkey logo

mongo-ruby-driver-testing's Introduction

This repo contains a bit of code to help with testing ruby mongo driver retries.

Each sub directory contains test code for a different set of drivers and approaches... It's all pretty hacky so, ymmv.

Mongo Replication Set Setup

Taken from: http://www.mongodb.org/display/DOCS/Replica+Set+Tutorial

On my Mac:

Create the data directories for the reply set:

    mkdir -p /usr/local/var/mongo_repl/r0
    mkdir -p /usr/local/var/mongo_repl/r1
    mkdir -p /usr/local/var/mongo_repl/r2

Then start up each instance:

    mongod --replSet repl_set --port 27017 --dbpath /usr/local/var/mongo_repl/r0
    mongod --replSet repl_set --port 27018 --dbpath /usr/local/var/mongo_repl/r1
    mongod --replSet repl_set --port 27019 --dbpath /usr/local/var/mongo_repl/r2

Initialize the set:

    bash$ mongo localhost:27017
    mongo > config = {_id: 'repl_set', members: [
                     {_id: 0, host: 'localhost:27017'},
                 {_id: 1, host: 'localhost:27018'},
                 {_id: 2, host: 'localhost:27019'}] 
                          } 
    mongo > rs.initiate(config);

Check the sets status with:

    mongo > rs.status()

Wait until every member has health 1. All members should be in state 2 except for one member that is in state 1

mongo-ruby-driver-testing's People

Contributors

lritter avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

zipperguru

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.