Commit cd5be67d authored by Ramon Nou's avatar Ramon Nou
Browse files

updated README.MD and protected Distributor for duplicated inserts

parent e132f0dd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -227,7 +227,7 @@ The following modules are available:
   module will only be available if the client library is built in `Debug`
   mode.
 - `all`: All previous options combined.
 - `traces_reads`: Generate log line with extra information in read operations for guided distributor
 - `trace_reads`: Generate log line with extra information in read operations for guided distributor
 - `help`: Print a help message and exit.

When tracing sytem calls, specific syscalls can be removed from log messages by
+5 −1
Original line number Diff line number Diff line
@@ -122,7 +122,11 @@ GuidedDistributor::init_guided() {

    while (mapfile >> path >> chunk_id >> destination_host) {
        // We need destination+1, as 0 has an special meaning in the interval map.
        auto I = map_interval.find(path);
        if (I == map_interval.end())
            map_interval[path] += make_pair(  boost::icl::discrete_interval<chunkid_t>::right_open (chunk_id, chunk_id+1), destination_host+1);
        else if (I->second.find(chunk_id) == I->second.end())
            I->second.insert( make_pair(  boost::icl::discrete_interval<chunkid_t>::right_open (chunk_id, chunk_id+1), destination_host+1) );
    }
    mapfile.close();
    return true;