~evarlast/ubuntu/utopic/mongodb/upstart-workaround-debian-bug-718702

« back to all changes in this revision

Viewing changes to src/mongo/s/chunk_diff.h

  • Committer: Package Import Robot
  • Author(s): James Page, James Page, Robie Basak
  • Date: 2013-05-29 17:44:42 UTC
  • mfrom: (44.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20130529174442-z0a4qmoww4y0t458
Tags: 1:2.4.3-1ubuntu1
[ James Page ]
* Merge from Debian unstable, remaining changes:
  - Enable SSL support:
    + d/control: Add libssl-dev to BD's.
    + d/rules: Enabled --ssl option.
    + d/mongodb.conf: Add example SSL configuration options.
  - d/mongodb-server.mongodb.upstart: Add upstart configuration.
  - d/rules: Don't strip binaries during scons build for Ubuntu.
  - d/control: Add armhf to target archs.
  - d/p/SConscript.client.patch: fixup install of client libraries.
  - d/p/0010-install-libs-to-usr-lib-not-usr-lib64-Closes-588557.patch:
    Install libraries to lib not lib64.
* Dropped changes:
  - d/p/arm-support.patch: Included in Debian.
  - d/p/double-alignment.patch: Included in Debian.
  - d/rules,control: Debian also builds with avaliable system libraries
    now.
* Fix FTBFS due to gcc and boost upgrades in saucy:
  - d/p/0008-ignore-unused-local-typedefs.patch: Add -Wno-unused-typedefs
    to unbreak building with g++-4.8.
  - d/p/0009-boost-1.53.patch: Fixup signed/unsigned casting issue.

[ Robie Basak ]
* d/p/0011-Use-a-signed-char-to-store-BSONType-enumerations.patch: Fixup
  build failure on ARM due to missing signed'ness of char cast.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// @file chunk.h
 
1
// @file chunk_diff.h
2
2
 
3
3
/**
4
4
*    Copyright (C) 2008 10gen Inc.
18
18
 
19
19
#pragma once
20
20
 
21
 
#include "util.h"
22
 
#include "../bson/bsonobj.h"
23
 
#include "../client/dbclientcursor.h"
24
 
#include "../client/connpool.h"
25
 
 
26
 
// TODO: Ideally wouldn't need this, but ShardNS data isn't extracted from config.h
27
 
#include "config.h"
 
21
#include "mongo/bson/bsonobj.h"
 
22
#include "mongo/client/dbclientcursor.h"
 
23
#include "mongo/client/connpool.h"
 
24
#include "mongo/s/chunk.h"
 
25
#include "mongo/s/chunk_version.h"
28
26
 
29
27
namespace mongo {
30
28
 
67
65
         */
68
66
        void attach( const string& ns,
69
67
                     RangeMap& currMap,
70
 
                     ShardChunkVersion& maxVersion,
71
 
                     map<ShardType, ShardChunkVersion>& maxShardVersions )
 
68
                     ChunkVersion& maxVersion,
 
69
                     map<ShardType, ChunkVersion>& maxShardVersions )
72
70
        {
73
71
            _ns = ns;
74
72
            _currMap = &currMap;
137
135
        // Returns the number of diffs processed, or -1 if the diffs were inconsistent
138
136
        // Throws a DBException on connection errors
139
137
        int calculateConfigDiff( string config,
140
 
                                 const set<ShardChunkVersion>& extraMinorVersions = set<ShardChunkVersion>() );
 
138
                                 const set<ChunkVersion>& extraMinorVersions = set<ChunkVersion>() );
141
139
 
142
140
        // Applies changes to the config data from a cursor passed in
143
141
        // Returns the number of diffs processed, or -1 if the diffs were inconsistent
146
144
 
147
145
        // Returns the query needed to find new changes to a collection from the config server
148
146
        // Needed only if a custom connection is required to the config server
149
 
        Query configDiffQuery( const set<ShardChunkVersion>& extraMinorVersions = set<ShardChunkVersion>() ) const;
 
147
        Query configDiffQuery( const set<ChunkVersion>& extraMinorVersions = set<ChunkVersion>() ) const;
150
148
 
151
149
    private:
152
150
 
153
151
        string _ns;
154
152
        RangeMap* _currMap;
155
 
        ShardChunkVersion* _maxVersion;
156
 
        map<ShardType, ShardChunkVersion>* _maxShardVersions;
 
153
        ChunkVersion* _maxVersion;
 
154
        map<ShardType, ChunkVersion>* _maxShardVersions;
157
155
 
158
156
        // Store for later use
159
157
        int _validDiffs;