mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-16 02:42:23 +08:00
Implementation complete (not yet working)
This commit is contained in:
parent
1d5572a078
commit
6afce01744
@ -27,6 +27,7 @@
|
|||||||
// ClientDBInfo is all the information needed by a database client to access the database
|
// ClientDBInfo is all the information needed by a database client to access the database
|
||||||
// It is returned (and kept up to date) by the OpenDatabaseRequest interface of ClusterInterface
|
// It is returned (and kept up to date) by the OpenDatabaseRequest interface of ClusterInterface
|
||||||
struct ClientDBInfo {
|
struct ClientDBInfo {
|
||||||
|
constexpr static FileIdentifier file_identifier = 5355080;
|
||||||
UID id; // Changes each time anything else changes
|
UID id; // Changes each time anything else changes
|
||||||
vector< MasterProxyInterface > proxies;
|
vector< MasterProxyInterface > proxies;
|
||||||
double clientTxnInfoSampleRate;
|
double clientTxnInfoSampleRate;
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
// Streams from WorkerInterface that are safe and useful to call from a client.
|
// Streams from WorkerInterface that are safe and useful to call from a client.
|
||||||
// A ClientWorkerInterface is embedded as the first element of a WorkerInterface.
|
// A ClientWorkerInterface is embedded as the first element of a WorkerInterface.
|
||||||
struct ClientWorkerInterface {
|
struct ClientWorkerInterface {
|
||||||
|
constexpr static FileIdentifier file_identifier = 12418152;
|
||||||
RequestStream< struct RebootRequest > reboot;
|
RequestStream< struct RebootRequest > reboot;
|
||||||
RequestStream< struct ProfilerRequest > profiler;
|
RequestStream< struct ProfilerRequest > profiler;
|
||||||
|
|
||||||
@ -45,6 +46,7 @@ struct ClientWorkerInterface {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct RebootRequest {
|
struct RebootRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 11913957;
|
||||||
bool deleteData;
|
bool deleteData;
|
||||||
bool checkData;
|
bool checkData;
|
||||||
|
|
||||||
@ -57,6 +59,7 @@ struct RebootRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct ProfilerRequest {
|
struct ProfilerRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 15437862;
|
||||||
ReplyPromise<Void> reply;
|
ReplyPromise<Void> reply;
|
||||||
|
|
||||||
enum class Type : std::int8_t {
|
enum class Type : std::int8_t {
|
||||||
|
@ -131,6 +131,7 @@ struct ClientVersionRef {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct OpenDatabaseRequest {
|
struct OpenDatabaseRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 2799502;
|
||||||
// Sent by the native API to the cluster controller to open a database and track client
|
// Sent by the native API to the cluster controller to open a database and track client
|
||||||
// info changes. Returns immediately if the current client info id is different from
|
// info changes. Returns immediately if the current client info id is different from
|
||||||
// knownClientInfoID; otherwise returns when it next changes (or perhaps after a long interval)
|
// knownClientInfoID; otherwise returns when it next changes (or perhaps after a long interval)
|
||||||
@ -152,6 +153,7 @@ struct OpenDatabaseRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct SystemFailureStatus {
|
struct SystemFailureStatus {
|
||||||
|
constexpr static FileIdentifier file_identifier = 3194108;
|
||||||
NetworkAddressList addresses;
|
NetworkAddressList addresses;
|
||||||
FailureStatus status;
|
FailureStatus status;
|
||||||
|
|
||||||
@ -175,6 +177,7 @@ struct FailureMonitoringRequest {
|
|||||||
// The failureInformationVersion returned in reply should be passed back to the
|
// The failureInformationVersion returned in reply should be passed back to the
|
||||||
// next request to facilitate delta compression of the failure information.
|
// next request to facilitate delta compression of the failure information.
|
||||||
|
|
||||||
|
constexpr static FileIdentifier file_identifier = 5867851;
|
||||||
Optional<FailureStatus> senderStatus;
|
Optional<FailureStatus> senderStatus;
|
||||||
Version failureInformationVersion;
|
Version failureInformationVersion;
|
||||||
NetworkAddressList addresses;
|
NetworkAddressList addresses;
|
||||||
@ -187,6 +190,7 @@ struct FailureMonitoringRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct FailureMonitoringReply {
|
struct FailureMonitoringReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 6820325;
|
||||||
VectorRef< SystemFailureStatus > changes;
|
VectorRef< SystemFailureStatus > changes;
|
||||||
Version failureInformationVersion;
|
Version failureInformationVersion;
|
||||||
bool allOthersFailed; // If true, changes are relative to all servers being failed, otherwise to the version given in the request
|
bool allOthersFailed; // If true, changes are relative to all servers being failed, otherwise to the version given in the request
|
||||||
@ -201,6 +205,7 @@ struct FailureMonitoringReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct StatusRequest {
|
struct StatusRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 14419140;
|
||||||
ReplyPromise< struct StatusReply > reply;
|
ReplyPromise< struct StatusReply > reply;
|
||||||
|
|
||||||
template <class Ar>
|
template <class Ar>
|
||||||
@ -210,6 +215,7 @@ struct StatusRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct StatusReply {
|
struct StatusReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 9980504;
|
||||||
StatusObject statusObj;
|
StatusObject statusObj;
|
||||||
std::string statusStr;
|
std::string statusStr;
|
||||||
|
|
||||||
@ -235,6 +241,7 @@ struct StatusReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetClientWorkersRequest {
|
struct GetClientWorkersRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 10771791;
|
||||||
ReplyPromise<vector<ClientWorkerInterface>> reply;
|
ReplyPromise<vector<ClientWorkerInterface>> reply;
|
||||||
|
|
||||||
GetClientWorkersRequest() {}
|
GetClientWorkersRequest() {}
|
||||||
@ -246,6 +253,7 @@ struct GetClientWorkersRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct ForceRecoveryRequest {
|
struct ForceRecoveryRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 14821350;
|
||||||
Key dcId;
|
Key dcId;
|
||||||
ReplyPromise<Void> reply;
|
ReplyPromise<Void> reply;
|
||||||
|
|
||||||
|
@ -91,6 +91,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct LeaderInfo {
|
struct LeaderInfo {
|
||||||
|
constexpr static FileIdentifier file_identifier = 8338794;
|
||||||
UID changeID;
|
UID changeID;
|
||||||
static const uint64_t mask = ~(127ll << 57);
|
static const uint64_t mask = ~(127ll << 57);
|
||||||
Value serializedInfo;
|
Value serializedInfo;
|
||||||
@ -126,6 +127,7 @@ struct LeaderInfo {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetLeaderRequest {
|
struct GetLeaderRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 214727;
|
||||||
Key key;
|
Key key;
|
||||||
UID knownLeader;
|
UID knownLeader;
|
||||||
ReplyPromise< Optional<LeaderInfo> > reply;
|
ReplyPromise< Optional<LeaderInfo> > reply;
|
||||||
|
@ -540,6 +540,7 @@ struct Traceable<RangeResultRef> : std::true_type {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct KeyValueStoreType {
|
struct KeyValueStoreType {
|
||||||
|
constexpr static FileIdentifier file_identifier = 6560359;
|
||||||
// These enumerated values are stored in the database configuration, so can NEVER be changed. Only add new ones just before END.
|
// These enumerated values are stored in the database configuration, so can NEVER be changed. Only add new ones just before END.
|
||||||
enum StoreType {
|
enum StoreType {
|
||||||
SSD_BTREE_V1,
|
SSD_BTREE_V1,
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "flow/Stats.h"
|
#include "flow/Stats.h"
|
||||||
|
|
||||||
struct MasterProxyInterface {
|
struct MasterProxyInterface {
|
||||||
|
constexpr static FileIdentifier file_identifier = 8954922;
|
||||||
enum { LocationAwareLoadBalance = 1 };
|
enum { LocationAwareLoadBalance = 1 };
|
||||||
enum { AlwaysFresh = 1 };
|
enum { AlwaysFresh = 1 };
|
||||||
|
|
||||||
@ -71,6 +72,7 @@ struct MasterProxyInterface {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct CommitID {
|
struct CommitID {
|
||||||
|
constexpr static FileIdentifier file_identifier = 14254927;
|
||||||
Version version; // returns invalidVersion if transaction conflicts
|
Version version; // returns invalidVersion if transaction conflicts
|
||||||
uint16_t txnBatchId;
|
uint16_t txnBatchId;
|
||||||
Optional<Value> metadataVersion;
|
Optional<Value> metadataVersion;
|
||||||
@ -85,6 +87,7 @@ struct CommitID {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct CommitTransactionRequest : TimedRequest {
|
struct CommitTransactionRequest : TimedRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 93948;
|
||||||
enum {
|
enum {
|
||||||
FLAG_IS_LOCK_AWARE = 0x1,
|
FLAG_IS_LOCK_AWARE = 0x1,
|
||||||
FLAG_FIRST_IN_BATCH = 0x2
|
FLAG_FIRST_IN_BATCH = 0x2
|
||||||
@ -121,6 +124,7 @@ static inline int getBytes( CommitTransactionRequest const& r ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct GetReadVersionReply {
|
struct GetReadVersionReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 15709388;
|
||||||
Version version;
|
Version version;
|
||||||
bool locked;
|
bool locked;
|
||||||
Optional<Value> metadataVersion;
|
Optional<Value> metadataVersion;
|
||||||
@ -132,6 +136,7 @@ struct GetReadVersionReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetReadVersionRequest : TimedRequest {
|
struct GetReadVersionRequest : TimedRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 838566;
|
||||||
enum {
|
enum {
|
||||||
PRIORITY_SYSTEM_IMMEDIATE = 15 << 24, // Highest possible priority, always executed even if writes are otherwise blocked
|
PRIORITY_SYSTEM_IMMEDIATE = 15 << 24, // Highest possible priority, always executed even if writes are otherwise blocked
|
||||||
PRIORITY_DEFAULT = 8 << 24,
|
PRIORITY_DEFAULT = 8 << 24,
|
||||||
@ -161,6 +166,7 @@ struct GetReadVersionRequest : TimedRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetKeyServerLocationsReply {
|
struct GetKeyServerLocationsReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 10636023;
|
||||||
Arena arena;
|
Arena arena;
|
||||||
vector<pair<KeyRangeRef, vector<StorageServerInterface>>> results;
|
vector<pair<KeyRangeRef, vector<StorageServerInterface>>> results;
|
||||||
|
|
||||||
@ -171,6 +177,7 @@ struct GetKeyServerLocationsReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetKeyServerLocationsRequest {
|
struct GetKeyServerLocationsRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 9144680;
|
||||||
Arena arena;
|
Arena arena;
|
||||||
KeyRef begin;
|
KeyRef begin;
|
||||||
Optional<KeyRef> end;
|
Optional<KeyRef> end;
|
||||||
@ -188,6 +195,7 @@ struct GetKeyServerLocationsRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetRawCommittedVersionRequest {
|
struct GetRawCommittedVersionRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 12954034;
|
||||||
Optional<UID> debugID;
|
Optional<UID> debugID;
|
||||||
ReplyPromise<GetReadVersionReply> reply;
|
ReplyPromise<GetReadVersionReply> reply;
|
||||||
|
|
||||||
@ -200,6 +208,7 @@ struct GetRawCommittedVersionRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetStorageServerRejoinInfoReply {
|
struct GetStorageServerRejoinInfoReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 9469225;
|
||||||
Version version;
|
Version version;
|
||||||
Tag tag;
|
Tag tag;
|
||||||
Optional<Tag> newTag;
|
Optional<Tag> newTag;
|
||||||
@ -213,6 +222,7 @@ struct GetStorageServerRejoinInfoReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetStorageServerRejoinInfoRequest {
|
struct GetStorageServerRejoinInfoRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 994279;
|
||||||
UID id;
|
UID id;
|
||||||
Optional<Value> dcId;
|
Optional<Value> dcId;
|
||||||
ReplyPromise< GetStorageServerRejoinInfoReply > reply;
|
ReplyPromise< GetStorageServerRejoinInfoReply > reply;
|
||||||
@ -227,6 +237,7 @@ struct GetStorageServerRejoinInfoRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct TxnStateRequest {
|
struct TxnStateRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 15250781;
|
||||||
Arena arena;
|
Arena arena;
|
||||||
VectorRef<KeyValueRef> data;
|
VectorRef<KeyValueRef> data;
|
||||||
Sequence sequence;
|
Sequence sequence;
|
||||||
|
@ -30,11 +30,8 @@
|
|||||||
#include "flow/Stats.h"
|
#include "flow/Stats.h"
|
||||||
|
|
||||||
struct StorageServerInterface {
|
struct StorageServerInterface {
|
||||||
enum {
|
constexpr static FileIdentifier file_identifier = 15302073;
|
||||||
BUSY_ALLOWED = 0,
|
enum { BUSY_ALLOWED = 0, BUSY_FORCE = 1, BUSY_LOCAL = 2 };
|
||||||
BUSY_FORCE = 1,
|
|
||||||
BUSY_LOCAL = 2
|
|
||||||
};
|
|
||||||
|
|
||||||
enum { LocationAwareLoadBalance = 1 };
|
enum { LocationAwareLoadBalance = 1 };
|
||||||
enum { AlwaysFresh = 0 };
|
enum { AlwaysFresh = 0 };
|
||||||
@ -114,6 +111,7 @@ struct ServerCacheInfo {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetValueReply : public LoadBalancedReply {
|
struct GetValueReply : public LoadBalancedReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 1378929;
|
||||||
Optional<Value> value;
|
Optional<Value> value;
|
||||||
|
|
||||||
GetValueReply() {}
|
GetValueReply() {}
|
||||||
@ -126,6 +124,7 @@ struct GetValueReply : public LoadBalancedReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetValueRequest : TimedRequest {
|
struct GetValueRequest : TimedRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 8454530;
|
||||||
Key key;
|
Key key;
|
||||||
Version version;
|
Version version;
|
||||||
Optional<UID> debugID;
|
Optional<UID> debugID;
|
||||||
@ -141,6 +140,7 @@ struct GetValueRequest : TimedRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct WatchValueRequest {
|
struct WatchValueRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 14747733;
|
||||||
Key key;
|
Key key;
|
||||||
Optional<Value> value;
|
Optional<Value> value;
|
||||||
Version version;
|
Version version;
|
||||||
@ -157,6 +157,7 @@ struct WatchValueRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetKeyValuesReply : public LoadBalancedReply {
|
struct GetKeyValuesReply : public LoadBalancedReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 1783066;
|
||||||
Arena arena;
|
Arena arena;
|
||||||
VectorRef<KeyValueRef> data;
|
VectorRef<KeyValueRef> data;
|
||||||
Version version; // useful when latestVersion was requested
|
Version version; // useful when latestVersion was requested
|
||||||
@ -169,6 +170,7 @@ struct GetKeyValuesReply : public LoadBalancedReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetKeyValuesRequest : TimedRequest {
|
struct GetKeyValuesRequest : TimedRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 6795746;
|
||||||
Arena arena;
|
Arena arena;
|
||||||
KeySelectorRef begin, end;
|
KeySelectorRef begin, end;
|
||||||
Version version; // or latestVersion
|
Version version; // or latestVersion
|
||||||
@ -185,6 +187,7 @@ struct GetKeyValuesRequest : TimedRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetKeyReply : public LoadBalancedReply {
|
struct GetKeyReply : public LoadBalancedReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 11226513;
|
||||||
KeySelector sel;
|
KeySelector sel;
|
||||||
|
|
||||||
GetKeyReply() {}
|
GetKeyReply() {}
|
||||||
@ -197,6 +200,7 @@ struct GetKeyReply : public LoadBalancedReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetKeyRequest : TimedRequest {
|
struct GetKeyRequest : TimedRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 10457870;
|
||||||
Arena arena;
|
Arena arena;
|
||||||
KeySelectorRef sel;
|
KeySelectorRef sel;
|
||||||
Version version; // or latestVersion
|
Version version; // or latestVersion
|
||||||
@ -212,6 +216,7 @@ struct GetKeyRequest : TimedRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetShardStateRequest {
|
struct GetShardStateRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 15860168;
|
||||||
enum waitMode {
|
enum waitMode {
|
||||||
NO_WAIT = 0,
|
NO_WAIT = 0,
|
||||||
FETCHING = 1,
|
FETCHING = 1,
|
||||||
@ -231,6 +236,7 @@ struct GetShardStateRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct StorageMetrics {
|
struct StorageMetrics {
|
||||||
|
constexpr static FileIdentifier file_identifier = 13622226;
|
||||||
int64_t bytes; // total storage
|
int64_t bytes; // total storage
|
||||||
int64_t bytesPerKSecond; // network bandwidth (average over 10s)
|
int64_t bytesPerKSecond; // network bandwidth (average over 10s)
|
||||||
int64_t iosPerKSecond;
|
int64_t iosPerKSecond;
|
||||||
@ -283,6 +289,7 @@ struct StorageMetrics {
|
|||||||
struct WaitMetricsRequest {
|
struct WaitMetricsRequest {
|
||||||
// Waits for any of the given minimum or maximum metrics to be exceeded, and then returns the current values
|
// Waits for any of the given minimum or maximum metrics to be exceeded, and then returns the current values
|
||||||
// Send a reversed range for min, max to receive an immediate report
|
// Send a reversed range for min, max to receive an immediate report
|
||||||
|
constexpr static FileIdentifier file_identifier = 1795961;
|
||||||
Arena arena;
|
Arena arena;
|
||||||
KeyRangeRef keys;
|
KeyRangeRef keys;
|
||||||
StorageMetrics min, max;
|
StorageMetrics min, max;
|
||||||
@ -301,6 +308,7 @@ struct WaitMetricsRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct SplitMetricsReply {
|
struct SplitMetricsReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 11530792;
|
||||||
Standalone<VectorRef<KeyRef>> splits;
|
Standalone<VectorRef<KeyRef>> splits;
|
||||||
StorageMetrics used;
|
StorageMetrics used;
|
||||||
|
|
||||||
@ -311,6 +319,7 @@ struct SplitMetricsReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct SplitMetricsRequest {
|
struct SplitMetricsRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 10463876;
|
||||||
Arena arena;
|
Arena arena;
|
||||||
KeyRangeRef keys;
|
KeyRangeRef keys;
|
||||||
StorageMetrics limits;
|
StorageMetrics limits;
|
||||||
@ -329,6 +338,7 @@ struct SplitMetricsRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetPhysicalMetricsReply {
|
struct GetPhysicalMetricsReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 15491478;
|
||||||
StorageMetrics load;
|
StorageMetrics load;
|
||||||
StorageMetrics free;
|
StorageMetrics free;
|
||||||
StorageMetrics capacity;
|
StorageMetrics capacity;
|
||||||
@ -340,6 +350,7 @@ struct GetPhysicalMetricsReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetPhysicalMetricsRequest {
|
struct GetPhysicalMetricsRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 13290999;
|
||||||
ReplyPromise<GetPhysicalMetricsReply> reply;
|
ReplyPromise<GetPhysicalMetricsReply> reply;
|
||||||
|
|
||||||
template <class Ar>
|
template <class Ar>
|
||||||
@ -350,6 +361,7 @@ struct GetPhysicalMetricsRequest {
|
|||||||
|
|
||||||
struct StorageQueuingMetricsRequest {
|
struct StorageQueuingMetricsRequest {
|
||||||
// SOMEDAY: Send threshold value to avoid polling faster than the information changes?
|
// SOMEDAY: Send threshold value to avoid polling faster than the information changes?
|
||||||
|
constexpr static FileIdentifier file_identifier = 3978640;
|
||||||
ReplyPromise<struct StorageQueuingMetricsReply> reply;
|
ReplyPromise<struct StorageQueuingMetricsReply> reply;
|
||||||
|
|
||||||
template <class Ar>
|
template <class Ar>
|
||||||
@ -359,6 +371,7 @@ struct StorageQueuingMetricsRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct StorageQueuingMetricsReply {
|
struct StorageQueuingMetricsReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 7633366;
|
||||||
double localTime;
|
double localTime;
|
||||||
int64_t instanceID; // changes if bytesDurable and bytesInput reset
|
int64_t instanceID; // changes if bytesDurable and bytesInput reset
|
||||||
int64_t bytesDurable, bytesInput;
|
int64_t bytesDurable, bytesInput;
|
||||||
|
@ -329,7 +329,8 @@ struct Peer : NonCopyable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pkt.connectPacketLength = sizeof(pkt) - sizeof(pkt.connectPacketLength);
|
pkt.connectPacketLength = sizeof(pkt) - sizeof(pkt.connectPacketLength);
|
||||||
pkt.protocolVersion = currentProtocolVersion;
|
pkt.protocolVersion =
|
||||||
|
g_network->useObjectSerializer() ? addObjectSerializerFlag(currentProtocolVersion) : currentProtocolVersion;
|
||||||
pkt.connectionId = transport->transportId;
|
pkt.connectionId = transport->transportId;
|
||||||
|
|
||||||
PacketBuffer* pb_first = new PacketBuffer;
|
PacketBuffer* pb_first = new PacketBuffer;
|
||||||
@ -1013,19 +1014,26 @@ static PacketID sendPacket( TransportData* self, ISerializeSource const& what, c
|
|||||||
TEST(true); // "Loopback" delivery
|
TEST(true); // "Loopback" delivery
|
||||||
// SOMEDAY: Would it be better to avoid (de)serialization by doing this check in flow?
|
// SOMEDAY: Would it be better to avoid (de)serialization by doing this check in flow?
|
||||||
|
|
||||||
|
Standalone<StringRef> copy;
|
||||||
|
if (g_network->useObjectSerializer()) {
|
||||||
|
ObjectWriter wr;
|
||||||
|
what.serializeBinaryWriter(wr);
|
||||||
|
copy = wr.toStringRef();
|
||||||
|
} else {
|
||||||
BinaryWriter wr( AssumeVersion(currentProtocolVersion) );
|
BinaryWriter wr( AssumeVersion(currentProtocolVersion) );
|
||||||
// we don't need to send using an object writer here. This is a loopback delivery
|
// we don't need to send using an object writer here. This is a loopback delivery
|
||||||
// and therefore it is guaranteed that both versions will have exactly the
|
// and therefore it is guaranteed that both versions will have exactly the
|
||||||
// same structures - so the backwards compatability capabilities are never needed
|
// same structures - so the backwards compatability capabilities are never needed
|
||||||
// here.
|
// here.
|
||||||
what.serializeBinaryWriter(wr);
|
what.serializeBinaryWriter(wr);
|
||||||
Standalone<StringRef> copy = wr.toValue();
|
copy = wr.toStringRef();
|
||||||
|
}
|
||||||
#if VALGRIND
|
#if VALGRIND
|
||||||
VALGRIND_CHECK_MEM_IS_DEFINED(copy.begin(), copy.size());
|
VALGRIND_CHECK_MEM_IS_DEFINED(copy.begin(), copy.size());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
deliver(self, destination, ArenaReader(copy.arena(), copy, AssumeVersion(currentProtocolVersion)), false,
|
deliver(self, destination, ArenaReader(copy.arena(), copy, AssumeVersion(currentProtocolVersion)), false,
|
||||||
false);
|
g_network->useObjectSerializer());
|
||||||
|
|
||||||
return (PacketID)NULL;
|
return (PacketID)NULL;
|
||||||
} else {
|
} else {
|
||||||
|
@ -24,12 +24,14 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include "flow/network.h"
|
#include "flow/network.h"
|
||||||
|
#include "flow/FileIdentifier.h"
|
||||||
|
|
||||||
#pragma pack(push, 4)
|
#pragma pack(push, 4)
|
||||||
class Endpoint {
|
class Endpoint {
|
||||||
public:
|
public:
|
||||||
// Endpoint represents a particular service (e.g. a serialized Promise<T> or PromiseStream<T>)
|
// Endpoint represents a particular service (e.g. a serialized Promise<T> or PromiseStream<T>)
|
||||||
// An endpoint is either "local" (used for receiving data) or "remote" (used for sending data)
|
// An endpoint is either "local" (used for receiving data) or "remote" (used for sending data)
|
||||||
|
constexpr static FileIdentifier file_identifier = 10618805;
|
||||||
typedef UID Token;
|
typedef UID Token;
|
||||||
NetworkAddressList addresses;
|
NetworkAddressList addresses;
|
||||||
Token token;
|
Token token;
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "flow/flow.h"
|
#include "flow/flow.h"
|
||||||
|
|
||||||
struct ProcessClass {
|
struct ProcessClass {
|
||||||
|
constexpr static FileIdentifier file_identifier = 6697257;
|
||||||
// This enum is stored in restartInfo.ini for upgrade tests, so be very careful about changing the existing items!
|
// This enum is stored in restartInfo.ini for upgrade tests, so be very careful about changing the existing items!
|
||||||
enum ClassType { UnsetClass, StorageClass, TransactionClass, ResolutionClass, TesterClass, ProxyClass, MasterClass, StatelessClass, LogClass, ClusterControllerClass, LogRouterClass, DataDistributorClass, CoordinatorClass, RatekeeperClass, InvalidClass = -1 };
|
enum ClassType { UnsetClass, StorageClass, TransactionClass, ResolutionClass, TesterClass, ProxyClass, MasterClass, StatelessClass, LogClass, ClusterControllerClass, LogRouterClass, DataDistributorClass, CoordinatorClass, RatekeeperClass, InvalidClass = -1 };
|
||||||
enum Fitness { BestFit, GoodFit, UnsetFit, OkayFit, WorstFit, ExcludeFit, NeverAssign }; //cannot be larger than 7 because of leader election mask
|
enum Fitness { BestFit, GoodFit, UnsetFit, OkayFit, WorstFit, ExcludeFit, NeverAssign }; //cannot be larger than 7 because of leader election mask
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
using std::vector;
|
using std::vector;
|
||||||
|
|
||||||
struct PerfMetric {
|
struct PerfMetric {
|
||||||
|
constexpr static FileIdentifier file_identifier = 5980618;
|
||||||
PerfMetric() : m_name(""), m_value(0), m_averaged(false), m_format_code( "%.3g" ) {}
|
PerfMetric() : m_name(""), m_value(0), m_averaged(false), m_format_code( "%.3g" ) {}
|
||||||
PerfMetric( std::string name, double value, bool averaged ) : m_name(name), m_value(value), m_averaged(averaged), m_format_code( "%.3g" ) {}
|
PerfMetric( std::string name, double value, bool averaged ) : m_name(name), m_value(value), m_averaged(averaged), m_format_code( "%.3g" ) {}
|
||||||
PerfMetric( std::string name, double value, bool averaged, std::string format_code ) : m_name(name), m_value(value), m_averaged(averaged), m_format_code(format_code) {}
|
PerfMetric( std::string name, double value, bool averaged, std::string format_code ) : m_name(name), m_value(value), m_averaged(averaged), m_format_code(format_code) {}
|
||||||
|
@ -392,7 +392,7 @@ void serializeReplicationPolicy(Ar& ar, Reference<IReplicationPolicy>& policy) {
|
|||||||
policy = Reference<IReplicationPolicy>(pointer);
|
policy = Reference<IReplicationPolicy>(pointer);
|
||||||
}
|
}
|
||||||
else if(name == LiteralStringRef("And")) {
|
else if(name == LiteralStringRef("And")) {
|
||||||
PolicyAnd* pointer = new PolicyAnd({});
|
PolicyAnd* pointer = new PolicyAnd{};
|
||||||
pointer->serialize(ar);
|
pointer->serialize(ar);
|
||||||
policy = Reference<IReplicationPolicy>(pointer);
|
policy = Reference<IReplicationPolicy>(pointer);
|
||||||
}
|
}
|
||||||
|
@ -112,8 +112,9 @@ template <class T>
|
|||||||
class ReplyPromise sealed
|
class ReplyPromise sealed
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
constexpr static FileIdentifier file_identifier = (0x2 << 24) | FileIdentifierFor<T>::value;
|
||||||
template <class U>
|
template <class U>
|
||||||
void send(U && value) const {
|
void send(U&& value) const {
|
||||||
sav->send(std::forward<U>(value));
|
sav->send(std::forward<U>(value));
|
||||||
}
|
}
|
||||||
template <class E>
|
template <class E>
|
||||||
|
@ -72,6 +72,7 @@ struct ClusterControllerFullInterface {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct RecruitFromConfigurationRequest {
|
struct RecruitFromConfigurationRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 2023046;
|
||||||
DatabaseConfiguration configuration;
|
DatabaseConfiguration configuration;
|
||||||
bool recruitSeedServers;
|
bool recruitSeedServers;
|
||||||
int maxOldLogRouters;
|
int maxOldLogRouters;
|
||||||
@ -88,6 +89,7 @@ struct RecruitFromConfigurationRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct RecruitFromConfigurationReply {
|
struct RecruitFromConfigurationReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 2224085;
|
||||||
vector<WorkerInterface> tLogs;
|
vector<WorkerInterface> tLogs;
|
||||||
vector<WorkerInterface> satelliteTLogs;
|
vector<WorkerInterface> satelliteTLogs;
|
||||||
vector<WorkerInterface> proxies;
|
vector<WorkerInterface> proxies;
|
||||||
@ -106,6 +108,7 @@ struct RecruitFromConfigurationReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct RecruitRemoteFromConfigurationRequest {
|
struct RecruitRemoteFromConfigurationRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 3235995;
|
||||||
DatabaseConfiguration configuration;
|
DatabaseConfiguration configuration;
|
||||||
Optional<Key> dcId;
|
Optional<Key> dcId;
|
||||||
int logRouterCount;
|
int logRouterCount;
|
||||||
@ -122,6 +125,7 @@ struct RecruitRemoteFromConfigurationRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct RecruitRemoteFromConfigurationReply {
|
struct RecruitRemoteFromConfigurationReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 9091392;
|
||||||
vector<WorkerInterface> remoteTLogs;
|
vector<WorkerInterface> remoteTLogs;
|
||||||
vector<WorkerInterface> logRouters;
|
vector<WorkerInterface> logRouters;
|
||||||
|
|
||||||
@ -132,6 +136,7 @@ struct RecruitRemoteFromConfigurationReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct RecruitStorageReply {
|
struct RecruitStorageReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 15877089;
|
||||||
WorkerInterface worker;
|
WorkerInterface worker;
|
||||||
ProcessClass processClass;
|
ProcessClass processClass;
|
||||||
|
|
||||||
@ -142,6 +147,7 @@ struct RecruitStorageReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct RecruitStorageRequest {
|
struct RecruitStorageRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 905920;
|
||||||
std::vector<Optional<Standalone<StringRef>>> excludeMachines; //< Don't recruit any of these machines
|
std::vector<Optional<Standalone<StringRef>>> excludeMachines; //< Don't recruit any of these machines
|
||||||
std::vector<AddressExclusion> excludeAddresses; //< Don't recruit any of these addresses
|
std::vector<AddressExclusion> excludeAddresses; //< Don't recruit any of these addresses
|
||||||
std::vector<Optional<Standalone<StringRef>>> includeDCs;
|
std::vector<Optional<Standalone<StringRef>>> includeDCs;
|
||||||
@ -155,6 +161,7 @@ struct RecruitStorageRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct RegisterWorkerReply {
|
struct RegisterWorkerReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 16475696;
|
||||||
ProcessClass processClass;
|
ProcessClass processClass;
|
||||||
ClusterControllerPriorityInfo priorityInfo;
|
ClusterControllerPriorityInfo priorityInfo;
|
||||||
|
|
||||||
@ -168,6 +175,7 @@ struct RegisterWorkerReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct RegisterWorkerRequest {
|
struct RegisterWorkerRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 14332605;
|
||||||
WorkerInterface wi;
|
WorkerInterface wi;
|
||||||
ProcessClass initialClass;
|
ProcessClass initialClass;
|
||||||
ProcessClass processClass;
|
ProcessClass processClass;
|
||||||
@ -189,6 +197,7 @@ struct RegisterWorkerRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetWorkersRequest {
|
struct GetWorkersRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 1254174;
|
||||||
enum { TESTER_CLASS_ONLY = 0x1, NON_EXCLUDED_PROCESSES_ONLY = 0x2 };
|
enum { TESTER_CLASS_ONLY = 0x1, NON_EXCLUDED_PROCESSES_ONLY = 0x2 };
|
||||||
|
|
||||||
int flags;
|
int flags;
|
||||||
@ -204,6 +213,7 @@ struct GetWorkersRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct RegisterMasterRequest {
|
struct RegisterMasterRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 10773445;
|
||||||
UID id;
|
UID id;
|
||||||
LocalityData mi;
|
LocalityData mi;
|
||||||
LogSystemConfig logSystemConfig;
|
LogSystemConfig logSystemConfig;
|
||||||
@ -231,6 +241,7 @@ struct RegisterMasterRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetServerDBInfoRequest {
|
struct GetServerDBInfoRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 9467438;
|
||||||
UID knownServerInfoID;
|
UID knownServerInfoID;
|
||||||
Standalone<VectorRef<StringRef>> issues;
|
Standalone<VectorRef<StringRef>> issues;
|
||||||
std::vector<NetworkAddress> incompatiblePeers;
|
std::vector<NetworkAddress> incompatiblePeers;
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "fdbclient/CoordinationInterface.h"
|
#include "fdbclient/CoordinationInterface.h"
|
||||||
|
|
||||||
struct GenerationRegInterface {
|
struct GenerationRegInterface {
|
||||||
|
constexpr static FileIdentifier file_identifier = 16726744;
|
||||||
RequestStream< struct GenerationRegReadRequest > read;
|
RequestStream< struct GenerationRegReadRequest > read;
|
||||||
RequestStream< struct GenerationRegWriteRequest > write;
|
RequestStream< struct GenerationRegWriteRequest > write;
|
||||||
|
|
||||||
@ -52,6 +53,7 @@ struct GenerationRegInterface {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct UniqueGeneration {
|
struct UniqueGeneration {
|
||||||
|
constexpr static FileIdentifier file_identifier = 16684234;
|
||||||
uint64_t generation;
|
uint64_t generation;
|
||||||
UID uid;
|
UID uid;
|
||||||
UniqueGeneration() : generation(0) {}
|
UniqueGeneration() : generation(0) {}
|
||||||
@ -71,6 +73,7 @@ struct UniqueGeneration {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GenerationRegReadRequest {
|
struct GenerationRegReadRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 8975311;
|
||||||
Key key;
|
Key key;
|
||||||
UniqueGeneration gen;
|
UniqueGeneration gen;
|
||||||
ReplyPromise<struct GenerationRegReadReply> reply;
|
ReplyPromise<struct GenerationRegReadReply> reply;
|
||||||
@ -83,6 +86,7 @@ struct GenerationRegReadRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GenerationRegReadReply {
|
struct GenerationRegReadReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 12623609;
|
||||||
Optional<Value> value;
|
Optional<Value> value;
|
||||||
UniqueGeneration gen, rgen;
|
UniqueGeneration gen, rgen;
|
||||||
GenerationRegReadReply() {}
|
GenerationRegReadReply() {}
|
||||||
@ -94,6 +98,7 @@ struct GenerationRegReadReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GenerationRegWriteRequest {
|
struct GenerationRegWriteRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 3521510;
|
||||||
KeyValue kv;
|
KeyValue kv;
|
||||||
UniqueGeneration gen;
|
UniqueGeneration gen;
|
||||||
ReplyPromise< UniqueGeneration > reply;
|
ReplyPromise< UniqueGeneration > reply;
|
||||||
@ -116,6 +121,7 @@ struct LeaderElectionRegInterface : ClientLeaderRegInterface {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct CandidacyRequest {
|
struct CandidacyRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 14473958;
|
||||||
Key key;
|
Key key;
|
||||||
LeaderInfo myInfo;
|
LeaderInfo myInfo;
|
||||||
UID knownLeader, prevChangeID;
|
UID knownLeader, prevChangeID;
|
||||||
@ -131,6 +137,7 @@ struct CandidacyRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct LeaderHeartbeatRequest {
|
struct LeaderHeartbeatRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 9495992;
|
||||||
Key key;
|
Key key;
|
||||||
LeaderInfo myInfo;
|
LeaderInfo myInfo;
|
||||||
UID prevChangeID;
|
UID prevChangeID;
|
||||||
@ -146,6 +153,7 @@ struct LeaderHeartbeatRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct ForwardRequest {
|
struct ForwardRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 13570359;
|
||||||
Key key;
|
Key key;
|
||||||
Value conn; // a cluster connection string
|
Value conn; // a cluster connection string
|
||||||
ReplyPromise<Void> reply;
|
ReplyPromise<Void> reply;
|
||||||
|
@ -75,8 +75,10 @@ ACTOR Future<Void> changeLeaderCoordinators( ServerCoordinators coordinators, Va
|
|||||||
return Void();
|
return Void();
|
||||||
}
|
}
|
||||||
|
|
||||||
ACTOR Future<Void> tryBecomeLeaderInternal( ServerCoordinators coordinators, Value proposedSerializedInterface, Reference<AsyncVar<Value>> outSerializedLeader, bool hasConnected, Reference<AsyncVar<ClusterControllerPriorityInfo>> asyncPriorityInfo ) {
|
ACTOR Future<Void> tryBecomeLeaderInternal(ServerCoordinators coordinators, Value proposedSerializedInterface,
|
||||||
state Reference<AsyncVar<vector<Optional<LeaderInfo>>>> nominees( new AsyncVar<vector<Optional<LeaderInfo>>>() );
|
Reference<AsyncVar<Value>> outSerializedLeader, bool hasConnected,
|
||||||
|
Reference<AsyncVar<ClusterControllerPriorityInfo>> asyncPriorityInfo) {
|
||||||
|
state Reference<AsyncVar<vector<Optional<LeaderInfo>>>> nominees(new AsyncVar<vector<Optional<LeaderInfo>>>());
|
||||||
state LeaderInfo myInfo;
|
state LeaderInfo myInfo;
|
||||||
state Future<Void> candidacies;
|
state Future<Void> candidacies;
|
||||||
state bool iAmLeader = false;
|
state bool iAmLeader = false;
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
typedef uint64_t DBRecoveryCount;
|
typedef uint64_t DBRecoveryCount;
|
||||||
|
|
||||||
struct MasterInterface {
|
struct MasterInterface {
|
||||||
|
constexpr static FileIdentifier file_identifier = 5979145;
|
||||||
LocalityData locality;
|
LocalityData locality;
|
||||||
RequestStream< ReplyPromise<Void> > waitFailure;
|
RequestStream< ReplyPromise<Void> > waitFailure;
|
||||||
RequestStream< struct TLogRejoinRequest > tlogRejoin; // sent by tlog (whether or not rebooted) to communicate with a new master
|
RequestStream< struct TLogRejoinRequest > tlogRejoin; // sent by tlog (whether or not rebooted) to communicate with a new master
|
||||||
@ -54,6 +55,7 @@ struct MasterInterface {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct TLogRejoinRequest {
|
struct TLogRejoinRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 15692200;
|
||||||
TLogInterface myInterface;
|
TLogInterface myInterface;
|
||||||
ReplyPromise<bool> reply; // false means someone else registered, so we should re-register. true means this master is recovered, so don't send again to the same master.
|
ReplyPromise<bool> reply; // false means someone else registered, so we should re-register. true means this master is recovered, so don't send again to the same master.
|
||||||
|
|
||||||
@ -66,6 +68,7 @@ struct TLogRejoinRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct ChangeCoordinatorsRequest {
|
struct ChangeCoordinatorsRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 13605416;
|
||||||
Standalone<StringRef> newConnectionString;
|
Standalone<StringRef> newConnectionString;
|
||||||
ReplyPromise<Void> reply; // normally throws even on success!
|
ReplyPromise<Void> reply; // normally throws even on success!
|
||||||
|
|
||||||
@ -79,6 +82,7 @@ struct ChangeCoordinatorsRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct ResolverMoveRef {
|
struct ResolverMoveRef {
|
||||||
|
constexpr static FileIdentifier file_identifier = 11945475;
|
||||||
KeyRangeRef range;
|
KeyRangeRef range;
|
||||||
int dest;
|
int dest;
|
||||||
|
|
||||||
@ -104,6 +108,7 @@ struct ResolverMoveRef {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetCommitVersionReply {
|
struct GetCommitVersionReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 3568822;
|
||||||
Standalone<VectorRef<ResolverMoveRef>> resolverChanges;
|
Standalone<VectorRef<ResolverMoveRef>> resolverChanges;
|
||||||
Version resolverChangesVersion;
|
Version resolverChangesVersion;
|
||||||
Version version;
|
Version version;
|
||||||
@ -120,6 +125,7 @@ struct GetCommitVersionReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct GetCommitVersionRequest {
|
struct GetCommitVersionRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 16683181;
|
||||||
uint64_t requestNum;
|
uint64_t requestNum;
|
||||||
uint64_t mostRecentProcessedRequestNum;
|
uint64_t mostRecentProcessedRequestNum;
|
||||||
UID requestingProxy;
|
UID requestingProxy;
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include "fdbclient/FDBTypes.h"
|
#include "fdbclient/FDBTypes.h"
|
||||||
#include "fdbrpc/fdbrpc.h"
|
#include "fdbrpc/fdbrpc.h"
|
||||||
|
#include "flow/FileIdentifier.h"
|
||||||
|
|
||||||
struct NetworkTestInterface {
|
struct NetworkTestInterface {
|
||||||
RequestStream< struct NetworkTestRequest > test;
|
RequestStream< struct NetworkTestRequest > test;
|
||||||
@ -33,6 +34,7 @@ struct NetworkTestInterface {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct NetworkTestRequest {
|
struct NetworkTestRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 4146513;
|
||||||
Key key;
|
Key key;
|
||||||
uint32_t replySize;
|
uint32_t replySize;
|
||||||
ReplyPromise<struct NetworkTestReply> reply;
|
ReplyPromise<struct NetworkTestReply> reply;
|
||||||
@ -45,6 +47,7 @@ struct NetworkTestRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct NetworkTestReply {
|
struct NetworkTestReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 14465374;
|
||||||
Value value;
|
Value value;
|
||||||
NetworkTestReply() {}
|
NetworkTestReply() {}
|
||||||
NetworkTestReply( Value value ) : value(value) {}
|
NetworkTestReply( Value value ) : value(value) {}
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "fdbclient/FDBTypes.h"
|
#include "fdbclient/FDBTypes.h"
|
||||||
|
|
||||||
struct ResolverInterface {
|
struct ResolverInterface {
|
||||||
|
constexpr static FileIdentifier file_identifier = 1755944;
|
||||||
enum { LocationAwareLoadBalance = 1 };
|
enum { LocationAwareLoadBalance = 1 };
|
||||||
enum { AlwaysFresh = 1 };
|
enum { AlwaysFresh = 1 };
|
||||||
|
|
||||||
@ -54,6 +55,7 @@ struct ResolverInterface {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct StateTransactionRef {
|
struct StateTransactionRef {
|
||||||
|
constexpr static FileIdentifier file_identifier = 6150271;
|
||||||
StateTransactionRef() {}
|
StateTransactionRef() {}
|
||||||
StateTransactionRef(const bool committed, VectorRef<MutationRef> const& mutations) : committed(committed), mutations(mutations) {}
|
StateTransactionRef(const bool committed, VectorRef<MutationRef> const& mutations) : committed(committed), mutations(mutations) {}
|
||||||
StateTransactionRef(Arena &p, const StateTransactionRef &toCopy) : committed(toCopy.committed), mutations(p, toCopy.mutations) {}
|
StateTransactionRef(Arena &p, const StateTransactionRef &toCopy) : committed(toCopy.committed), mutations(p, toCopy.mutations) {}
|
||||||
@ -70,6 +72,7 @@ struct StateTransactionRef {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct ResolveTransactionBatchReply {
|
struct ResolveTransactionBatchReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 15472264;
|
||||||
Arena arena;
|
Arena arena;
|
||||||
VectorRef<uint8_t> committed;
|
VectorRef<uint8_t> committed;
|
||||||
Optional<UID> debugID;
|
Optional<UID> debugID;
|
||||||
@ -83,6 +86,7 @@ struct ResolveTransactionBatchReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct ResolveTransactionBatchRequest {
|
struct ResolveTransactionBatchRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 16462858;
|
||||||
Arena arena;
|
Arena arena;
|
||||||
|
|
||||||
Version prevVersion;
|
Version prevVersion;
|
||||||
@ -100,6 +104,7 @@ struct ResolveTransactionBatchRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct ResolutionMetricsRequest {
|
struct ResolutionMetricsRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 11663527;
|
||||||
ReplyPromise<int64_t> reply;
|
ReplyPromise<int64_t> reply;
|
||||||
|
|
||||||
template <class Archive>
|
template <class Archive>
|
||||||
@ -109,6 +114,7 @@ struct ResolutionMetricsRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct ResolutionSplitReply {
|
struct ResolutionSplitReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 12137765;
|
||||||
Key key;
|
Key key;
|
||||||
int64_t used;
|
int64_t used;
|
||||||
template <class Archive>
|
template <class Archive>
|
||||||
@ -119,6 +125,7 @@ struct ResolutionSplitReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct ResolutionSplitRequest {
|
struct ResolutionSplitRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 167535;
|
||||||
KeyRange range;
|
KeyRange range;
|
||||||
int64_t offset;
|
int64_t offset;
|
||||||
bool front;
|
bool front;
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "fdbrpc/Locality.h"
|
#include "fdbrpc/Locality.h"
|
||||||
|
|
||||||
struct RestoreInterface {
|
struct RestoreInterface {
|
||||||
|
constexpr static FileIdentifier file_identifier = 13398189;
|
||||||
RequestStream< struct TestRequest > test;
|
RequestStream< struct TestRequest > test;
|
||||||
|
|
||||||
bool operator == (RestoreInterface const& r) const { return id() == r.id(); }
|
bool operator == (RestoreInterface const& r) const { return id() == r.id(); }
|
||||||
@ -46,6 +47,7 @@ struct RestoreInterface {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct TestRequest {
|
struct TestRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 14404487;
|
||||||
int testData;
|
int testData;
|
||||||
ReplyPromise< struct TestReply > reply;
|
ReplyPromise< struct TestReply > reply;
|
||||||
|
|
||||||
@ -59,6 +61,7 @@ struct TestRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct TestReply {
|
struct TestReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 12075719;
|
||||||
int replyData;
|
int replyData;
|
||||||
|
|
||||||
TestReply() : replyData(0) {}
|
TestReply() : replyData(0) {}
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include "fdbserver/LatencyBandConfig.h"
|
#include "fdbserver/LatencyBandConfig.h"
|
||||||
|
|
||||||
struct ServerDBInfo {
|
struct ServerDBInfo {
|
||||||
|
constexpr static FileIdentifier file_identifier = 13838807;
|
||||||
// This structure contains transient information which is broadcast to all workers for a database,
|
// This structure contains transient information which is broadcast to all workers for a database,
|
||||||
// permitting them to communicate with each other. It is not available to the client. This mechanism
|
// permitting them to communicate with each other. It is not available to the client. This mechanism
|
||||||
// (see GetServerDBInfoRequest) is closely parallel to OpenDatabaseRequest for the client.
|
// (see GetServerDBInfoRequest) is closely parallel to OpenDatabaseRequest for the client.
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
struct TLogInterface {
|
struct TLogInterface {
|
||||||
|
constexpr static FileIdentifier file_identifier = 16308510;
|
||||||
enum { LocationAwareLoadBalance = 1 };
|
enum { LocationAwareLoadBalance = 1 };
|
||||||
enum { AlwaysFresh = 1 };
|
enum { AlwaysFresh = 1 };
|
||||||
|
|
||||||
@ -71,6 +72,7 @@ struct TLogInterface {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct TLogRecoveryFinishedRequest {
|
struct TLogRecoveryFinishedRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 8818668;
|
||||||
ReplyPromise<Void> reply;
|
ReplyPromise<Void> reply;
|
||||||
|
|
||||||
TLogRecoveryFinishedRequest() {}
|
TLogRecoveryFinishedRequest() {}
|
||||||
@ -82,6 +84,7 @@ struct TLogRecoveryFinishedRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct TLogLockResult {
|
struct TLogLockResult {
|
||||||
|
constexpr static FileIdentifier file_identifier = 11822027;
|
||||||
Version end;
|
Version end;
|
||||||
Version knownCommittedVersion;
|
Version knownCommittedVersion;
|
||||||
|
|
||||||
@ -92,6 +95,7 @@ struct TLogLockResult {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct TLogConfirmRunningRequest {
|
struct TLogConfirmRunningRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 10929130;
|
||||||
Optional<UID> debugID;
|
Optional<UID> debugID;
|
||||||
ReplyPromise<Void> reply;
|
ReplyPromise<Void> reply;
|
||||||
|
|
||||||
@ -136,6 +140,7 @@ struct VerUpdateRef {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct TLogPeekReply {
|
struct TLogPeekReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 11365689;
|
||||||
Arena arena;
|
Arena arena;
|
||||||
StringRef messages;
|
StringRef messages;
|
||||||
Version end;
|
Version end;
|
||||||
@ -151,6 +156,7 @@ struct TLogPeekReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct TLogPeekRequest {
|
struct TLogPeekRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 11001131;
|
||||||
Arena arena;
|
Arena arena;
|
||||||
Version begin;
|
Version begin;
|
||||||
Tag tag;
|
Tag tag;
|
||||||
@ -168,6 +174,7 @@ struct TLogPeekRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct TLogPopRequest {
|
struct TLogPopRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 5556423;
|
||||||
Arena arena;
|
Arena arena;
|
||||||
Version to;
|
Version to;
|
||||||
Version durableKnownCommittedVersion;
|
Version durableKnownCommittedVersion;
|
||||||
@ -201,6 +208,7 @@ struct TagMessagesRef {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct TLogCommitRequest {
|
struct TLogCommitRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 4022206;
|
||||||
Arena arena;
|
Arena arena;
|
||||||
Version prevVersion, version, knownCommittedVersion, minKnownCommittedVersion;
|
Version prevVersion, version, knownCommittedVersion, minKnownCommittedVersion;
|
||||||
|
|
||||||
@ -219,6 +227,7 @@ struct TLogCommitRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct TLogQueuingMetricsRequest {
|
struct TLogQueuingMetricsRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 7798476;
|
||||||
ReplyPromise<struct TLogQueuingMetricsReply> reply;
|
ReplyPromise<struct TLogQueuingMetricsReply> reply;
|
||||||
|
|
||||||
template <class Ar>
|
template <class Ar>
|
||||||
@ -228,6 +237,7 @@ struct TLogQueuingMetricsRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct TLogQueuingMetricsReply {
|
struct TLogQueuingMetricsReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 12206626;
|
||||||
double localTime;
|
double localTime;
|
||||||
int64_t instanceID; // changes if bytesDurable and bytesInput reset
|
int64_t instanceID; // changes if bytesDurable and bytesInput reset
|
||||||
int64_t bytesDurable, bytesInput;
|
int64_t bytesDurable, bytesInput;
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#include "flow/actorcompiler.h" // has to be last include
|
#include "flow/actorcompiler.h" // has to be last include
|
||||||
|
|
||||||
struct WorkloadInterface {
|
struct WorkloadInterface {
|
||||||
|
constexpr static FileIdentifier file_identifier = 4454551;
|
||||||
RequestStream<ReplyPromise<Void>> setup;
|
RequestStream<ReplyPromise<Void>> setup;
|
||||||
RequestStream<ReplyPromise<Void>> start;
|
RequestStream<ReplyPromise<Void>> start;
|
||||||
RequestStream<ReplyPromise<bool>> check;
|
RequestStream<ReplyPromise<bool>> check;
|
||||||
@ -48,6 +49,7 @@ struct WorkloadInterface {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct WorkloadRequest {
|
struct WorkloadRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 8121024;
|
||||||
Arena arena;
|
Arena arena;
|
||||||
StringRef title;
|
StringRef title;
|
||||||
int timeout;
|
int timeout;
|
||||||
@ -79,6 +81,7 @@ struct WorkloadRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct TesterInterface {
|
struct TesterInterface {
|
||||||
|
constexpr static FileIdentifier file_identifier = 4465210;
|
||||||
RequestStream<WorkloadRequest> recruitments;
|
RequestStream<WorkloadRequest> recruitments;
|
||||||
|
|
||||||
UID id() const { return recruitments.getEndpoint().token; }
|
UID id() const { return recruitments.getEndpoint().token; }
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
#define DUMPTOKEN( name ) TraceEvent("DumpToken", recruited.id()).detail("Name", #name).detail("Token", name.getEndpoint().token)
|
#define DUMPTOKEN( name ) TraceEvent("DumpToken", recruited.id()).detail("Name", #name).detail("Token", name.getEndpoint().token)
|
||||||
|
|
||||||
struct WorkerInterface {
|
struct WorkerInterface {
|
||||||
|
constexpr static FileIdentifier file_identifier = 14712718;
|
||||||
ClientWorkerInterface clientInterface;
|
ClientWorkerInterface clientInterface;
|
||||||
LocalityData locality;
|
LocalityData locality;
|
||||||
RequestStream< struct InitializeTLogRequest > tLog;
|
RequestStream< struct InitializeTLogRequest > tLog;
|
||||||
@ -89,6 +90,7 @@ struct WorkerDetails {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct InitializeTLogRequest {
|
struct InitializeTLogRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 15604392;
|
||||||
UID recruitmentID;
|
UID recruitmentID;
|
||||||
LogSystemConfig recoverFrom;
|
LogSystemConfig recoverFrom;
|
||||||
Version recoverAt;
|
Version recoverAt;
|
||||||
@ -116,6 +118,7 @@ struct InitializeTLogRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct InitializeLogRouterRequest {
|
struct InitializeLogRouterRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 2976228;
|
||||||
uint64_t recoveryCount;
|
uint64_t recoveryCount;
|
||||||
Tag routerTag;
|
Tag routerTag;
|
||||||
Version startVersion;
|
Version startVersion;
|
||||||
@ -132,6 +135,7 @@ struct InitializeLogRouterRequest {
|
|||||||
|
|
||||||
// FIXME: Rename to InitializeMasterRequest, etc
|
// FIXME: Rename to InitializeMasterRequest, etc
|
||||||
struct RecruitMasterRequest {
|
struct RecruitMasterRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 12684574;
|
||||||
Arena arena;
|
Arena arena;
|
||||||
LifetimeToken lifetime;
|
LifetimeToken lifetime;
|
||||||
bool forceRecovery;
|
bool forceRecovery;
|
||||||
@ -147,6 +151,7 @@ struct RecruitMasterRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct InitializeMasterProxyRequest {
|
struct InitializeMasterProxyRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 10344153;
|
||||||
MasterInterface master;
|
MasterInterface master;
|
||||||
uint64_t recoveryCount;
|
uint64_t recoveryCount;
|
||||||
Version recoveryTransactionVersion;
|
Version recoveryTransactionVersion;
|
||||||
@ -184,6 +189,7 @@ struct InitializeRatekeeperRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct InitializeResolverRequest {
|
struct InitializeResolverRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 7413317;
|
||||||
uint64_t recoveryCount;
|
uint64_t recoveryCount;
|
||||||
int proxyCount;
|
int proxyCount;
|
||||||
int resolverCount;
|
int resolverCount;
|
||||||
@ -196,6 +202,7 @@ struct InitializeResolverRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct InitializeStorageReply {
|
struct InitializeStorageReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 10390645;
|
||||||
StorageServerInterface interf;
|
StorageServerInterface interf;
|
||||||
Version addedVersion;
|
Version addedVersion;
|
||||||
|
|
||||||
@ -206,6 +213,7 @@ struct InitializeStorageReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct InitializeStorageRequest {
|
struct InitializeStorageRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 16665642;
|
||||||
Tag seedTag; //< If this server will be passed to seedShardServers, this will be a tag, otherwise it is invalidTag
|
Tag seedTag; //< If this server will be passed to seedShardServers, this will be a tag, otherwise it is invalidTag
|
||||||
UID reqId;
|
UID reqId;
|
||||||
UID interfaceId;
|
UID interfaceId;
|
||||||
@ -219,6 +227,7 @@ struct InitializeStorageRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct TraceBatchDumpRequest {
|
struct TraceBatchDumpRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 8184121;
|
||||||
ReplyPromise<Void> reply;
|
ReplyPromise<Void> reply;
|
||||||
|
|
||||||
template <class Ar>
|
template <class Ar>
|
||||||
@ -228,6 +237,7 @@ struct TraceBatchDumpRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct LoadedReply {
|
struct LoadedReply {
|
||||||
|
constexpr static FileIdentifier file_identifier = 9956350;
|
||||||
Standalone<StringRef> payload;
|
Standalone<StringRef> payload;
|
||||||
UID id;
|
UID id;
|
||||||
|
|
||||||
@ -238,6 +248,7 @@ struct LoadedReply {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct LoadedPingRequest {
|
struct LoadedPingRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 4590979;
|
||||||
UID id;
|
UID id;
|
||||||
bool loadReply;
|
bool loadReply;
|
||||||
Standalone<StringRef> payload;
|
Standalone<StringRef> payload;
|
||||||
@ -250,6 +261,7 @@ struct LoadedPingRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct CoordinationPingMessage {
|
struct CoordinationPingMessage {
|
||||||
|
constexpr static FileIdentifier file_identifier = 9982747;
|
||||||
UID clusterControllerId;
|
UID clusterControllerId;
|
||||||
int64_t timeStep;
|
int64_t timeStep;
|
||||||
|
|
||||||
@ -263,6 +275,7 @@ struct CoordinationPingMessage {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct SetMetricsLogRateRequest {
|
struct SetMetricsLogRateRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 4245995;
|
||||||
uint32_t metricsLogsPerSecond;
|
uint32_t metricsLogsPerSecond;
|
||||||
|
|
||||||
SetMetricsLogRateRequest() : metricsLogsPerSecond( 1 ) {}
|
SetMetricsLogRateRequest() : metricsLogsPerSecond( 1 ) {}
|
||||||
@ -275,6 +288,7 @@ struct SetMetricsLogRateRequest {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct EventLogRequest {
|
struct EventLogRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 122319;
|
||||||
bool getLastError;
|
bool getLastError;
|
||||||
Standalone<StringRef> eventName;
|
Standalone<StringRef> eventName;
|
||||||
ReplyPromise< TraceEventFields > reply;
|
ReplyPromise< TraceEventFields > reply;
|
||||||
@ -309,6 +323,7 @@ struct DebugEntryRef {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct DiskStoreRequest {
|
struct DiskStoreRequest {
|
||||||
|
constexpr static FileIdentifier file_identifier = 1986262;
|
||||||
bool includePartialStores;
|
bool includePartialStores;
|
||||||
ReplyPromise<Standalone<VectorRef<UID>>> reply;
|
ReplyPromise<Standalone<VectorRef<UID>>> reply;
|
||||||
|
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
*/
|
*/
|
||||||
#ifndef _BTREE_H_
|
#ifndef _BTREE_H_
|
||||||
#define _BTREE_H_
|
#define _BTREE_H_
|
||||||
|
#ifndef NDEBUG
|
||||||
|
#define NDEBUG
|
||||||
|
#endif
|
||||||
|
|
||||||
/* TODO: This definition is just included so other modules compile. It
|
/* TODO: This definition is just included so other modules compile. It
|
||||||
** needs to be revisited.
|
** needs to be revisited.
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
#ifndef NDEBUG
|
||||||
|
#define NDEBUG
|
||||||
|
#endif
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
#define SQLITE_DEBUG 1
|
#define SQLITE_DEBUG 1
|
||||||
#endif
|
#endif
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "flow/actorcompiler.h" // This must be the last #include.
|
#include "flow/actorcompiler.h" // This must be the last #include.
|
||||||
|
|
||||||
struct SidebandMessage {
|
struct SidebandMessage {
|
||||||
|
constexpr static FileIdentifier file_identifier = 11862046;
|
||||||
uint64_t key;
|
uint64_t key;
|
||||||
Version commitVersion;
|
Version commitVersion;
|
||||||
|
|
||||||
@ -37,6 +38,7 @@ struct SidebandMessage {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct SidebandInterface {
|
struct SidebandInterface {
|
||||||
|
constexpr static FileIdentifier file_identifier = 15950544;
|
||||||
RequestStream<SidebandMessage> updates;
|
RequestStream<SidebandMessage> updates;
|
||||||
|
|
||||||
UID id() const { return updates.getEndpoint().token; }
|
UID id() const { return updates.getEndpoint().token; }
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "flow/Error.h"
|
#include "flow/Error.h"
|
||||||
#include "flow/Trace.h"
|
#include "flow/Trace.h"
|
||||||
#include "flow/ObjectSerializerTraits.h"
|
#include "flow/ObjectSerializerTraits.h"
|
||||||
|
#include "flow/FileIdentifier.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -512,6 +513,7 @@ extern std::string format(const char* form, ...);
|
|||||||
#pragma pack( push, 4 )
|
#pragma pack( push, 4 )
|
||||||
class StringRef {
|
class StringRef {
|
||||||
public:
|
public:
|
||||||
|
constexpr static FileIdentifier file_identifier = 13300811;
|
||||||
StringRef() : data(0), length(0) {}
|
StringRef() : data(0), length(0) {}
|
||||||
StringRef( Arena& p, const StringRef& toCopy ) : data( new (p) uint8_t[toCopy.size()] ), length( toCopy.size() ) {
|
StringRef( Arena& p, const StringRef& toCopy ) : data( new (p) uint8_t[toCopy.size()] ), length( toCopy.size() ) {
|
||||||
memcpy( (void*)data, toCopy.data, length );
|
memcpy( (void*)data, toCopy.data, length );
|
||||||
@ -778,6 +780,7 @@ template <class T>
|
|||||||
class VectorRef {
|
class VectorRef {
|
||||||
public:
|
public:
|
||||||
using value_type = T;
|
using value_type = T;
|
||||||
|
static constexpr FileIdentifier file_identifier = (0x8 << 24) | FileIdentifierFor<T>::value;
|
||||||
|
|
||||||
// T must be trivially destructible (and copyable)!
|
// T must be trivially destructible (and copyable)!
|
||||||
VectorRef() : data(0), m_size(0), m_capacity(0) {}
|
VectorRef() : data(0), m_size(0), m_capacity(0) {}
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#include <boost/preprocessor/control/if.hpp>
|
#include <boost/preprocessor/control/if.hpp>
|
||||||
#include "flow/Platform.h"
|
#include "flow/Platform.h"
|
||||||
#include "flow/Knobs.h"
|
#include "flow/Knobs.h"
|
||||||
|
#include "flow/FileIdentifier.h"
|
||||||
#include "flow/ObjectSerializerTraits.h"
|
#include "flow/ObjectSerializerTraits.h"
|
||||||
|
|
||||||
enum { invalid_error_code = 0xffff };
|
enum { invalid_error_code = 0xffff };
|
||||||
@ -41,6 +42,7 @@ public:
|
|||||||
|
|
||||||
class Error {
|
class Error {
|
||||||
public:
|
public:
|
||||||
|
constexpr static FileIdentifier file_identifier = 14065384;
|
||||||
int code() const { return error_code; }
|
int code() const { return error_code; }
|
||||||
const char* name() const;
|
const char* name() const;
|
||||||
const char* what() const;
|
const char* what() const;
|
||||||
|
@ -25,9 +25,7 @@ using FileIdentifier = uint32_t;
|
|||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
struct FileIdentifierFor {
|
struct FileIdentifierFor {
|
||||||
//constexpr static FileIdentifier value = T::file_identifier;
|
constexpr static FileIdentifier value = T::file_identifier;
|
||||||
// TODO: use file identifiers for different types
|
|
||||||
constexpr static FileIdentifier value = 0xffffff;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "flow/Platform.h"
|
#include "flow/Platform.h"
|
||||||
|
#include "flow/FileIdentifier.h"
|
||||||
#include "flow/ObjectSerializerTraits.h"
|
#include "flow/ObjectSerializerTraits.h"
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#if (defined(__APPLE__))
|
#if (defined(__APPLE__))
|
||||||
@ -35,6 +36,7 @@
|
|||||||
class UID {
|
class UID {
|
||||||
uint64_t part[2];
|
uint64_t part[2];
|
||||||
public:
|
public:
|
||||||
|
constexpr static FileIdentifier file_identifier = 15597147;
|
||||||
UID() { part[0] = part[1] = 0; }
|
UID() { part[0] = part[1] = 0; }
|
||||||
UID( uint64_t a, uint64_t b ) { part[0]=a; part[1]=b; }
|
UID( uint64_t a, uint64_t b ) { part[0]=a; part[1]=b; }
|
||||||
std::string toString() const;
|
std::string toString() const;
|
||||||
|
@ -101,7 +101,7 @@ class ObjectWriter {
|
|||||||
public:
|
public:
|
||||||
template <class... Items>
|
template <class... Items>
|
||||||
void serialize(FileIdentifier file_identifier, Items const&... items) {
|
void serialize(FileIdentifier file_identifier, Items const&... items) {
|
||||||
ASSERT(data = nullptr); // object serializer can only serialize one object
|
ASSERT(data == nullptr); // object serializer can only serialize one object
|
||||||
int allocations = 0;
|
int allocations = 0;
|
||||||
auto allocator = [this, &allocations](size_t size_) {
|
auto allocator = [this, &allocations](size_t size_) {
|
||||||
++allocations;
|
++allocations;
|
||||||
|
@ -57,6 +57,7 @@ enum Severity {
|
|||||||
|
|
||||||
class TraceEventFields {
|
class TraceEventFields {
|
||||||
public:
|
public:
|
||||||
|
constexpr static FileIdentifier file_identifier = 11262274;
|
||||||
typedef std::pair<std::string, std::string> Field;
|
typedef std::pair<std::string, std::string> Field;
|
||||||
typedef std::vector<Field> FieldContainer;
|
typedef std::vector<Field> FieldContainer;
|
||||||
typedef FieldContainer::const_iterator FieldIterator;
|
typedef FieldContainer::const_iterator FieldIterator;
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
#include "flow/Deque.h"
|
#include "flow/Deque.h"
|
||||||
#include "flow/ThreadPrimitives.h"
|
#include "flow/ThreadPrimitives.h"
|
||||||
#include "flow/network.h"
|
#include "flow/network.h"
|
||||||
|
#include "flow/FileIdentifier.h"
|
||||||
|
|
||||||
#include <boost/version.hpp>
|
#include <boost/version.hpp>
|
||||||
|
|
||||||
@ -114,6 +115,7 @@ Standalone<StringRef> concatenate( Iter b, Iter const& e ) {
|
|||||||
|
|
||||||
class Void {
|
class Void {
|
||||||
public:
|
public:
|
||||||
|
constexpr static FileIdentifier file_identifier = 2010442;
|
||||||
template <class Ar>
|
template <class Ar>
|
||||||
void serialize(Ar&) {}
|
void serialize(Ar&) {}
|
||||||
};
|
};
|
||||||
@ -123,6 +125,7 @@ class Never {};
|
|||||||
template <class T>
|
template <class T>
|
||||||
class ErrorOr {
|
class ErrorOr {
|
||||||
public:
|
public:
|
||||||
|
constexpr static FileIdentifier file_identifier = (0x1 << 24) | FileIdentifierFor<T>::value;
|
||||||
ErrorOr() : error(default_error_or()) {}
|
ErrorOr() : error(default_error_or()) {}
|
||||||
ErrorOr(Error const& error) : error(error) {}
|
ErrorOr(Error const& error) : error(error) {}
|
||||||
ErrorOr(const ErrorOr<T>& o) : error(o.error) {
|
ErrorOr(const ErrorOr<T>& o) : error(o.error) {
|
||||||
|
@ -715,6 +715,7 @@ private:
|
|||||||
struct ISerializeSource {
|
struct ISerializeSource {
|
||||||
virtual void serializePacketWriter(PacketWriter&, bool useObjectSerializer) const = 0;
|
virtual void serializePacketWriter(PacketWriter&, bool useObjectSerializer) const = 0;
|
||||||
virtual void serializeBinaryWriter(BinaryWriter&) const = 0;
|
virtual void serializeBinaryWriter(BinaryWriter&) const = 0;
|
||||||
|
virtual void serializeBinaryWriter(ObjectWriter&) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T, class V>
|
template <class T, class V>
|
||||||
@ -737,7 +738,12 @@ struct SerializeSource : MakeSerializeSource<SerializeSource<T>, T> {
|
|||||||
using value_type = T;
|
using value_type = T;
|
||||||
T const& value;
|
T const& value;
|
||||||
SerializeSource(T const& value) : value(value) {}
|
SerializeSource(T const& value) : value(value) {}
|
||||||
template <class Ar> void serialize(Ar& ar) const { ar << value; }
|
virtual void serializeBinaryWriter(ObjectWriter& w) const {
|
||||||
|
w.serialize(value);
|
||||||
|
}
|
||||||
|
template <class Ar> void serialize(Ar& ar) const {
|
||||||
|
ar << value;
|
||||||
|
}
|
||||||
virtual T const& get() const { return value; }
|
virtual T const& get() const { return value; }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -748,6 +754,9 @@ struct SerializeBoolAnd : MakeSerializeSource<SerializeBoolAnd<T>, T> {
|
|||||||
T const& value;
|
T const& value;
|
||||||
SerializeBoolAnd( bool b, T const& value ) : b(b), value(value) {}
|
SerializeBoolAnd( bool b, T const& value ) : b(b), value(value) {}
|
||||||
template <class Ar> void serialize(Ar& ar) const { ar << b << value; }
|
template <class Ar> void serialize(Ar& ar) const { ar << b << value; }
|
||||||
|
virtual void serializeBinaryWriter(ObjectWriter& w) const {
|
||||||
|
ASSERT(false);
|
||||||
|
}
|
||||||
virtual T const& get() const {
|
virtual T const& get() const {
|
||||||
// This is only used for the streaming serializer
|
// This is only used for the streaming serializer
|
||||||
ASSERT(false);
|
ASSERT(false);
|
||||||
|
@ -271,6 +271,9 @@ def run_simulation_test(basedir, options):
|
|||||||
if options.testtype == 'test':
|
if options.testtype == 'test':
|
||||||
pargs.append('-C')
|
pargs.append('-C')
|
||||||
pargs.append(os.path.join(args.builddir, 'fdb.cluster'))
|
pargs.append(os.path.join(args.builddir, 'fdb.cluster'))
|
||||||
|
else:
|
||||||
|
pargs.append('-S')
|
||||||
|
pargs.append('random')
|
||||||
td = TestDirectory(basedir)
|
td = TestDirectory(basedir)
|
||||||
if options.buggify:
|
if options.buggify:
|
||||||
pargs.append('-b')
|
pargs.append('-b')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user