Permalink
Browse files

[feature] database: a replicated mode for the database

  • Loading branch information...
Louis Gesbert
Louis Gesbert committed Jun 27, 2011
1 parent 3bb69fb commit 86cb15bf845555adec24752471a227c7a77f45de
Showing with 18 additions and 2 deletions.
  1. +18 −2 database/badop_meta.ml
View
@@ -138,11 +138,27 @@ let options_parser_with_default ?name (_default_m, default_o) =
| _ -> ""
in
Printf.sprintf
- "Use a local database at given path. Use additional flag 'restore' to try and recover a corrupted database, \
- or 'dot' to have a database dot output each commit%s. You can specify several flags, separated by ','." default_str)
+ "Use a local database at given path%s. Use additional flag 'restore' to try and recover a corrupted database, \
+ or 'dot' to have a database dot output each commit. You can specify several flags, separated by ','." default_str)
+ ;
]
@
#<If:BADOP_DEBUG> [
+ ["--db-remote-replicated"],
+ A.func (A.list ',' A.parse_addr)
+ (fun (_,o) addrlist ->
+ if o <> default_o
+ then prerr_endline ("Warning: database options before --db-remote-replicated will be ignored"^spec_msg);
+ (module Badop_dispatcher.F(Badop_client) : Badop.S),
+ Badop.Options_Dispatcher
+ (List.length addrlist,
+ List.map
+ (fun (addr,portopt) ->
+ Badop.Options_Client (Scheduler.default, (addr, Option.default default_port portopt)))
+ addrlist)),
+ "<host>[:<port>],<host>[:<port>],...",
+ "Use a remote database replicated on all the given servers"
+ ;
["--db-revision"],
A.func A.int
(fun (_,o) i ->

0 comments on commit 86cb15b

Please sign in to comment.