Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Robustify stress2 test + use tail recursive map everywhere #717

Merged
merged 4 commits into from
May 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ build-cmxs: build-alba

build-nsm-plugin: build-cmxs
cd ocaml && ocamlfind ocamlopt \
_build/src/tools/prelude.cmx \
_build/alba_version.cmx \
_build/src/range_query_args.cmx \
_build/src/tools/lwt_bytes2.cmx \
_build/src/tools/lwt_extra2.cmx \
_build/src/tools/prelude.cmx \
_build/src/tools/deser.cmx \
_build/src/tools/cache.cmx \
_build/src/tools/weak_pool.cmx \
Expand Down Expand Up @@ -73,10 +73,10 @@ build-nsm-plugin: build-cmxs

build-mgr-plugin: build-alba
cd ocaml && ocamlfind ocamlopt \
_build/src/tools/prelude.cmx \
_build/alba_version.cmx \
_build/src/tools/lwt_bytes2.cmx \
_build/src/tools/lwt_extra2.cmx \
_build/src/tools/prelude.cmx \
_build/src/range_query_args.cmx \
_build/src/tools/deser.cmx \
_build/src/tools/cache.cmx \
Expand Down
2 changes: 2 additions & 0 deletions jenkins/run2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export DRIVER=./setup/setup.native

export ARAKOON_BIN=$(which arakoon)

echo "ensure that all files open! Prelude"
find ocaml/src -name '*.ml' | while read f; do grep -q 'open! Prelude' $f || [ $f == "ocaml/src/tools/prelude.ml" ] || { echo $f && exit 1; }; done

if [ -t 1 ] || [[ ${1-bash} == "test_integrate_"* ]]
then true;
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba.ml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ but WITHOUT ANY WARRANTY of any kind.

open Cmdliner
open Lwt.Infix
open Prelude
open! Prelude
open Cli_common

let () =
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_arakoon.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Arakoon_client_config

module Config =
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_arakoon_deser.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Alba_arakoon

module Config =
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_base_client.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Lwt.Infix
open Checksum
open Lwt_bytes2
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_based_osd.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude

let to_namespace_name prefix = function
| 0 -> fun namespace_id ->
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_bench.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Lwt.Infix
open Generic_bench

Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_client.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Fragment_cache
open Alba_statistics
open Alba_client_errors
Expand Down
2 changes: 2 additions & 0 deletions ocaml/src/alba_client2.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open! Prelude

let make_client albamgr_client_cfg
?fragment_cache
?manifest_cache_size
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_client_common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Alba_client_errors

let get_best_policy policies osds_info_cache =
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_client_download.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Lwt_bytes2
open Slice
open Alba_statistics
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_client_download_slices.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Alba_interval
open Alba_client_errors
open Slice
Expand Down
2 changes: 2 additions & 0 deletions ocaml/src/alba_client_errors.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open! Prelude

module Error = struct
type t =
| ChecksumMismatch
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_client_message_delivery.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Slice
open Checksum
open Lwt.Infix
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_client_message_delivery_base.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Lwt.Infix

let deliver_messages :
Expand Down
1 change: 1 addition & 0 deletions ocaml/src/alba_client_namespace.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open! Prelude
open Lwt.Infix

let create_namespace
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_client_osd.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Slice
open Checksum
open Lwt.Infix
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_client_preset_cache.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Lwt.Infix

let _propagate_preset
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_client_sequence.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Checksum
open Lwt.Infix

Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_client_upload.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Slice
open Lwt_bytes2
open Recovery_info
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_eviction.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Lwt.Infix

let do_random_eviction
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_json.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Encryption
open Albamgr_protocol.Protocol

Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_osd.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Slice
open Alba_based_osd
open Lwt.Infix
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_osd_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Lwt.Infix

let test_with_kvs_client
Expand Down
2 changes: 2 additions & 0 deletions ocaml/src/alba_statistics.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open! Prelude

module Statistics = struct

let section = Lwt_log.Section.make "statistics"
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/alba_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Slice
open Encryption
open Lwt.Infix
Expand Down
1 change: 1 addition & 0 deletions ocaml/src/albamgr_access.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open! Prelude
open Remotes

class basic_mgr_pooled (albamgr_pool : Pool.Albamgr.t) =
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/albamgr_client.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Lwt.Infix
open Albamgr_protocol
open Protocol
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/albamgr_plugin.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Registry
open Lwt.Infix
open Albamgr_protocol
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/albamgr_protocol.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Statistics_collection

module Protocol = struct
Expand Down
1 change: 1 addition & 0 deletions ocaml/src/albamgr_protocol_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open! Prelude
open Albamgr_protocol

let make_info () =
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/albamgr_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Lwt.Infix
open Albamgr_protocol.Protocol

Expand Down
2 changes: 2 additions & 0 deletions ocaml/src/arith64.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open! Prelude

type operation =
| PLUS_EQ

Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/asd_bench.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Lwt_bytes2
open Lwt.Infix
open Cmdliner
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/asd_client.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Lwt.Infix
open Slice
open Lwt_bytes2
Expand Down
2 changes: 2 additions & 0 deletions ocaml/src/asd_config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open! Prelude

module Config = struct

type tls = { cert: string;
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/asd_io_scheduler.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Lwt_buffer
open Lwt.Infix

Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/asd_protocol.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open Prelude
open! Prelude
open Slice
open Checksum
open Asd_statistics
Expand Down
2 changes: 2 additions & 0 deletions ocaml/src/asd_protocol_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open! Prelude
open Asd_protocol
open Protocol

let roundtrip test_ctx =
let k = "the_key" in
let v = "the_value" in
Expand Down
2 changes: 1 addition & 1 deletion ocaml/src/asd_server.ml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ but WITHOUT ANY WARRANTY of any kind.
*)

open Lwt.Infix
open Prelude
open! Prelude
open Rocks_store
open Asd_protocol
open Slice
Expand Down
2 changes: 2 additions & 0 deletions ocaml/src/asd_statistics.ml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Open vStorage is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY of any kind.
*)

open! Prelude

module AsdStatistics = struct
module G = Statistics_collection.Generic
type t = G.t
Expand Down
Loading