Skip to content
Snippets Groups Projects
Commit 2fc28029 authored by Irene Y Zhang's avatar Irene Y Zhang
Browse files

Taking out some lingering SpecPaxos code and fixing a compile bug in the makefile

parent 06ea9463
No related branches found
No related tags found
No related merge requests found
...@@ -7,13 +7,13 @@ CXX = g++ ...@@ -7,13 +7,13 @@ CXX = g++
LD = g++ LD = g++
EXPAND = lib/tmpl/expand EXPAND = lib/tmpl/expand
CFLAGS := -g -Wall -pthread -iquote.obj/gen -Wno-uninitialized -levent_pthreads -O2 -DNASSERT #CFLAGS := -g -Wall -pthread -iquote.obj/gen -Wno-uninitialized -levent_pthreads -O2 -DNASSERT
#CFLAGS := -g -Wall -pthread -iquote.obj/gen -Wno-uninitialized -levent_pthreads CFLAGS := -g -Wall -pthread -iquote.obj/gen -Wno-uninitialized -levent_pthreads
CXXFLAGS := -g -std=c++0x -levent_pthreads CXXFLAGS := -g -std=c++0x -levent_pthreads
LDFLAGS := -levent_pthreads LDFLAGS := -levent_pthreads
## Debian package: check ## Debian package: check
# CHECK_CFLAGS := $(shell pkg-config --cflags check) #CHECK_CFLAGS := $(shell pkg-config --cflags check)
# CHECK_LDFLAGS := $(shell pkg-config --cflags --libs check) #CHECK_LDFLAGS := $(shell pkg-config --cflags --libs check)
# Debian package: libprotobuf-dev # Debian package: libprotobuf-dev
PROTOBUF_CFLAGS := $(shell pkg-config --cflags protobuf) PROTOBUF_CFLAGS := $(shell pkg-config --cflags protobuf)
PROTOBUF_LDFLAGS := $(shell pkg-config --cflags --libs protobuf) PROTOBUF_LDFLAGS := $(shell pkg-config --cflags --libs protobuf)
...@@ -26,8 +26,8 @@ LIBEVENT_LDFLAGS := $(shell pkg-config --libs libevent) ...@@ -26,8 +26,8 @@ LIBEVENT_LDFLAGS := $(shell pkg-config --libs libevent)
CFLAGS += $(LIBEVENT_CFLAGS) CFLAGS += $(LIBEVENT_CFLAGS)
LDFLAGS += $(LIBEVENT_LDFLAGS) LDFLAGS += $(LIBEVENT_LDFLAGS)
# Debian package: libssl-dev # Debian package: libssl-dev
LIBSSL_CFLAGS := $(shell pkg-config --cflags libssl) LIBSSL_CFLAGS := $(shell pkg-config --cflags openssl)
LIBSSL_LDFLAGS := $(shell pkg-config --libs libssl) LIBSSL_LDFLAGS := $(shell pkg-config --libs openssl)
CFLAGS += $(LIBSSL_CFLAGS) CFLAGS += $(LIBSSL_CFLAGS)
LDFLAGS += $(LIBSSL_LDFLAGS) LDFLAGS += $(LIBSSL_LDFLAGS)
...@@ -124,6 +124,7 @@ endef ...@@ -124,6 +124,7 @@ endef
include lib/Rules.mk include lib/Rules.mk
include replication/common/Rules.mk include replication/common/Rules.mk
include replication/vr/Rules.mk include replication/vr/Rules.mk
include replication/ir/Rules.mk
include store/common/Rules.mk include store/common/Rules.mk
include store/txnstore/Rules.mk include store/txnstore/Rules.mk
include store/qwstore/Rules.mk include store/qwstore/Rules.mk
......
...@@ -70,27 +70,6 @@ Replica::ReplicaUpcall(opnum_t opnum, const string &op, string &res) ...@@ -70,27 +70,6 @@ Replica::ReplicaUpcall(opnum_t opnum, const string &op, string &res)
Debug("Upcall result: %s", res.c_str()); Debug("Upcall result: %s", res.c_str());
} }
void
Replica::Rollback(opnum_t current, opnum_t to, Log &log)
{
Debug("Making rollback-upcall from " FMT_OPNUM " to " FMT_OPNUM,
current, to);
std::map<opnum_t, string> reqs;
for (opnum_t x = current; x > to; x--) {
reqs.insert(std::pair<opnum_t, string>(x,
log.Find(x)->request.op()));
}
app->RollbackUpcall(current, to, reqs);
}
void
Replica::Commit(opnum_t op)
{
app->CommitUpcall(op);
}
void void
Replica::UnloggedUpcall(const string &op, string &res) Replica::UnloggedUpcall(const string &op, string &res)
{ {
......
...@@ -59,10 +59,6 @@ public: ...@@ -59,10 +59,6 @@ public:
virtual void LeaderUpcall(opnum_t opnum, const string &str1, bool &replicate, string &str2) { replicate = true; str2 = str1; }; virtual void LeaderUpcall(opnum_t opnum, const string &str1, bool &replicate, string &str2) { replicate = true; str2 = str1; };
// Invoke callback on all replicas // Invoke callback on all replicas
virtual void ReplicaUpcall(opnum_t opnum, const string &str1, string &str2) { }; virtual void ReplicaUpcall(opnum_t opnum, const string &str1, string &str2) { };
// Rollback callback on failed speculative operations
virtual void RollbackUpcall(opnum_t current, opnum_t to, const std::map<opnum_t, string> &opMap) { };
// Commit callback to commit speculative operations
virtual void CommitUpcall(opnum_t) { };
// Invoke call back for unreplicated operations run on only one replica // Invoke call back for unreplicated operations run on only one replica
virtual void UnloggedUpcall(const string &str1, string &str2) { }; virtual void UnloggedUpcall(const string &str1, string &str2) { };
}; };
...@@ -79,8 +75,6 @@ protected: ...@@ -79,8 +75,6 @@ protected:
template<class MSG> void Execute(opnum_t opnum, template<class MSG> void Execute(opnum_t opnum,
const Request & msg, const Request & msg,
MSG &reply); MSG &reply);
void Rollback(opnum_t current, opnum_t to, Log &log);
void Commit(opnum_t op);
void UnloggedUpcall(const string &op, string &res); void UnloggedUpcall(const string &op, string &res);
template<class MSG> void ExecuteUnlogged(const UnloggedRequest & msg, template<class MSG> void ExecuteUnlogged(const UnloggedRequest & msg,
MSG &reply); MSG &reply);
......
...@@ -185,17 +185,8 @@ VRClient::HandleReply(const TransportAddress &remote, ...@@ -185,17 +185,8 @@ VRClient::HandleReply(const TransportAddress &remote,
PendingRequest *req = pendingRequest; PendingRequest *req = pendingRequest;
pendingRequest = NULL; pendingRequest = NULL;
#if CLIENT_NETWORK_DELAY
transport->Timer(CLIENT_NETWORK_DELAY, [=]() {
req->continuation(req->request, msg.reply());
delete req;
});
#else
req->continuation(req->request, msg.reply()); req->continuation(req->request, msg.reply());
delete req; delete req;
#endif
} }
void void
...@@ -214,15 +205,8 @@ VRClient::HandleUnloggedReply(const TransportAddress &remote, ...@@ -214,15 +205,8 @@ VRClient::HandleUnloggedReply(const TransportAddress &remote,
PendingRequest *req = pendingUnloggedRequest; PendingRequest *req = pendingUnloggedRequest;
pendingUnloggedRequest = NULL; pendingUnloggedRequest = NULL;
#if READ_AT_LEADER
transport->Timer(CLIENT_NETWORK_DELAY, [=]() {
req->continuation(req->request, msg.reply());
delete req;
});
#else
req->continuation(req->request, msg.reply()); req->continuation(req->request, msg.reply());
delete req; delete req;
#endif
} }
void void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment