Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Oleg Babin <olegrok@tarantool.org>,
	tarantool-patches@dev.tarantool.org,
	yaroslav.dynnikov@tarantool.org
Subject: Re: [Tarantool-patches] [PATCH vshard 6/6] router: update master using a hint from storage
Date: Mon, 5 Jul 2021 22:53:59 +0200	[thread overview]
Message-ID: <c9599038-b316-6829-4815-27b7af1b59d8@tarantool.org> (raw)
In-Reply-To: <7621af8d-7918-950d-4911-dec06cadb95b@tarantool.org>

>   - After changes in previous patch I think it could be better to use "master_search_wakeup" instead of master_search_fiber:wakeup()

Yes, I forgot to update this commit. Done now:

====================
diff --git a/test/router/master_discovery.result b/test/router/master_discovery.result
index 8416c8f..7ebb67d 100644
--- a/test/router/master_discovery.result
+++ b/test/router/master_discovery.result
@@ -115,7 +115,7 @@ function check_no_master_for_replicaset(rs_id)
     if not master then                                                          \
         return true                                                             \
     end                                                                         \
-    vshard.router.static.master_search_fiber:wakeup()                           \
+    vshard.router.master_search_wakeup()                                        \
     return false                                                                \
 end
  | ---
@@ -170,7 +170,7 @@ function check_master_discovery_block()
     if vshard.router.internal.errinj.ERRINJ_MASTER_SEARCH_DELAY == 'in' then    \
         return true                                                             \
     end                                                                         \
-    vshard.router.static.master_search_fiber:wakeup()                           \
+    vshard.router.master_search_wakeup()                                        \
     return false                                                                \
 end
  | ---
diff --git a/test/router/master_discovery.test.lua b/test/router/master_discovery.test.lua
index 9a9e60d..6276dc9 100644
--- a/test/router/master_discovery.test.lua
+++ b/test/router/master_discovery.test.lua
@@ -73,7 +73,7 @@ function check_no_master_for_replicaset(rs_id)
     if not master then                                                          \
         return true                                                             \
     end                                                                         \
-    vshard.router.static.master_search_fiber:wakeup()                           \
+    vshard.router.master_search_wakeup()                                        \
     return false                                                                \
 end
 
@@ -114,7 +114,7 @@ function check_master_discovery_block()
     if vshard.router.internal.errinj.ERRINJ_MASTER_SEARCH_DELAY == 'in' then    \
         return true                                                             \
     end                                                                         \
-    vshard.router.static.master_search_fiber:wakeup()                           \
+    vshard.router.master_search_wakeup()                                        \
     return false                                                                \
 end
 
====================

>   - Should we document somehow `update_master` method for replicaset object? Or maybe it even shouldn't be a part of public API?

Nope. It is a private method. If something is not documented on the
site, it is private. I couldn't come up with a better scheme and yet
not harm vshard's own code readability.

  reply	other threads:[~2021-07-05 20:54 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01 22:09 [Tarantool-patches] [PATCH vshard 0/6] Master discovery Vladislav Shpilevoy via Tarantool-patches
2021-07-01 22:09 ` [Tarantool-patches] [PATCH vshard 1/6] replicaset: introduce netbox_wait_connected() Vladislav Shpilevoy via Tarantool-patches
2021-07-02 11:46   ` Oleg Babin via Tarantool-patches
2021-07-01 22:09 ` [Tarantool-patches] [PATCH vshard 2/6] test: sort some table prints Vladislav Shpilevoy via Tarantool-patches
2021-07-02 11:46   ` Oleg Babin via Tarantool-patches
2021-07-01 22:09 ` [Tarantool-patches] [PATCH vshard 3/6] storage: introduce vshard.storage._call('info') Vladislav Shpilevoy via Tarantool-patches
2021-07-02 11:46   ` Oleg Babin via Tarantool-patches
2021-07-01 22:09 ` [Tarantool-patches] [PATCH vshard 4/6] config: introduce master 'auto' replicaset option Vladislav Shpilevoy via Tarantool-patches
2021-07-02 11:47   ` Oleg Babin via Tarantool-patches
2021-07-02 21:32     ` Vladislav Shpilevoy via Tarantool-patches
2021-07-05  9:23       ` Oleg Babin via Tarantool-patches
2021-07-01 22:09 ` [Tarantool-patches] [PATCH vshard 5/6] router: introduce automatic master discovery Vladislav Shpilevoy via Tarantool-patches
2021-07-02 11:48   ` Oleg Babin via Tarantool-patches
2021-07-02 21:35     ` Vladislav Shpilevoy via Tarantool-patches
2021-07-05  9:24       ` Oleg Babin via Tarantool-patches
2021-07-05 20:53         ` Vladislav Shpilevoy via Tarantool-patches
2021-07-06  8:54           ` Oleg Babin via Tarantool-patches
2021-07-06 21:19             ` Vladislav Shpilevoy via Tarantool-patches
2021-07-01 22:09 ` [Tarantool-patches] [PATCH vshard 6/6] router: update master using a hint from storage Vladislav Shpilevoy via Tarantool-patches
2021-07-02 11:49   ` Oleg Babin via Tarantool-patches
2021-07-02 21:36     ` Vladislav Shpilevoy via Tarantool-patches
2021-07-05  9:24       ` Oleg Babin via Tarantool-patches
2021-07-05 20:53         ` Vladislav Shpilevoy via Tarantool-patches [this message]
2021-07-06  8:55           ` Oleg Babin via Tarantool-patches
2021-07-02 21:36 ` [Tarantool-patches] [PATCH vshard 7/6] util: truncate too long fiber name Vladislav Shpilevoy via Tarantool-patches
2021-07-05  9:23   ` Oleg Babin via Tarantool-patches
2021-08-03 21:55 ` [Tarantool-patches] [PATCH vshard 0/6] Master discovery Vladislav Shpilevoy via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c9599038-b316-6829-4815-27b7af1b59d8@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=olegrok@tarantool.org \
    --cc=v.shpilevoy@tarantool.org \
    --cc=yaroslav.dynnikov@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH vshard 6/6] router: update master using a hint from storage' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox