This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Tarantool -- an efficient key/value data store".
The branch core-pull_from_remote_exit has been created
at 7b9bc88dab4f5dafaddc51c3c820b3b5ab5332b9 (commit)
commit 7b9bc88dab4f5dafaddc51c3c820b3b5ab5332b9
Author: Roman Tokarev <[email protected]>
Date: Mon Dec 6 15:43:36 2010 +0300
[core] exit from 'remote hot standby' fiber in case of EXIT_FIBER exception
diff --git a/core/log_io_remote.c b/core/log_io_remote.c
index fc87137..b2b14a2 100644
--- a/core/log_io_remote.c
+++ b/core/log_io_remote.c
@@ -137,8 +137,17 @@ pull_from_remote(void *state)
struct remote_state *h = state;
struct tbuf *row;
- if (setjmp(fiber->exc) != 0)
- fiber_close();
+ switch (setjmp(fiber->exc)) {
+ case 0:
+ break;
+
+ case FIBER_EXIT:
+ fiber_close();
+ return;
+
+ default:
+ fiber_close();
+ }
for (;;) {
row = remote_read_row(h->r->confirmed_lsn + 1);
diff --git a/include/fiber.h b/include/fiber.h
index 63e21ad..3ed8f4a 100644
--- a/include/fiber.h
+++ b/include/fiber.h
@@ -40,6 +40,8 @@
#include <say.h>
#include <coro.h>
+#define FIBER_EXIT -1
+
struct msg {
uint32_t sender_fid;
struct tbuf *msg;
--
Tarantool -- an efficient key/value data store
_______________________________________________
Mailing list: https://launchpad.net/~tarantool-developers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~tarantool-developers
More help : https://help.launchpad.net/ListHelp