Merge lp:~marcustomlinson/unity-scopes-api/revert_debug_timeout_config_params into lp:unity-scopes-api/devel

Proposed by Marcus Tomlinson
Status: Merged
Approved by: Paweł Stołowski
Approved revision: 607
Merged at revision: 607
Proposed branch: lp:~marcustomlinson/unity-scopes-api/revert_debug_timeout_config_params
Merge into: lp:unity-scopes-api/devel
Diff against target: 422 lines (+23/-99)
14 files modified
CMakeLists.txt (+1/-1)
CONFIGFILES (+0/-18)
RELEASE_NOTES.md (+0/-5)
debian/changelog (+0/-7)
debian/libunity-scopes3.symbols (+0/-1)
include/unity/scopes/internal/DfltConfig.h.in (+7/-9)
include/unity/scopes/internal/RegistryConfig.h (+0/-2)
include/unity/scopes/internal/zmq_middleware/ZmqConfig.h (+0/-2)
include/unity/scopes/internal/zmq_middleware/ZmqMiddleware.h (+0/-2)
scoperegistry/scoperegistry.cpp (+11/-15)
src/scopes/internal/RegistryConfig.cpp (+1/-13)
src/scopes/internal/zmq_middleware/ZmqConfig.cpp (+0/-13)
src/scopes/internal/zmq_middleware/ZmqMiddleware.cpp (+0/-6)
src/scopes/internal/zmq_middleware/ZmqScope.cpp (+3/-5)
To merge this branch: bzr merge lp:~marcustomlinson/unity-scopes-api/revert_debug_timeout_config_params
Reviewer Review Type Date Requested Status
Paweł Stołowski (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+263499@code.launchpad.net

Commit message

Reverted Debug.Process.Timeout and Debug.Locate.Timeout configuration parameters

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Paweł Stołowski (stolowski) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2015-06-29 10:26:01 +0000
+++ CMakeLists.txt 2015-07-01 11:05:00 +0000
@@ -218,7 +218,7 @@
218# API version218# API version
219set(UNITY_SCOPES_MAJOR 0)219set(UNITY_SCOPES_MAJOR 0)
220set(UNITY_SCOPES_MINOR 6)220set(UNITY_SCOPES_MINOR 6)
221set(UNITY_SCOPES_MICRO 20)221set(UNITY_SCOPES_MICRO 19)
222set(UNITY_SCOPES_SOVERSION 3)222set(UNITY_SCOPES_SOVERSION 3)
223223
224# Version for testing, with all symbols visible224# Version for testing, with all symbols visible
225225
=== modified file 'CONFIGFILES'
--- CONFIGFILES 2015-06-29 12:58:18 +0000
+++ CONFIGFILES 2015-07-01 11:05:00 +0000
@@ -226,15 +226,6 @@
226226
227 The default value is 5000 milliseconds.227 The default value is 5000 milliseconds.
228228
229- Debug.Locate.Timeout
230
231 This parameter overrides the value of Locate.Timeout above when DebugMode is enabled on
232 a target scope. (See DebugMode in <scope_id>.ini for more details)
233
234 Only values in the range 10 to 120000 milliseconds are accepted.
235
236 The default value is 30000 milliseconds.
237
238- Registry.Timeout229- Registry.Timeout
239230
240 The timeout to be used when invoking a twoway operation on the registry other231 The timeout to be used when invoking a twoway operation on the registry other
@@ -315,15 +306,6 @@
315 config group, otherwise the middleware can prematurely conclude that306 config group, otherwise the middleware can prematurely conclude that
316 a locate() request failed to start a scope.307 a locate() request failed to start a scope.
317308
318- Debug.Process.Timeout
319
320 This parameter overrides the value of Process.Timeout above when DebugMode is enabled on
321 a target scope. (See DebugMode in <scope_id>.ini for more details)
322
323 Only values in the range 10 to 120000 milliseconds are accepted.
324
325 The default value is 30000 milliseconds.
326
327309
328Smartscopes.ini310Smartscopes.ini
329--------------311--------------
330312
=== modified file 'RELEASE_NOTES.md'
--- RELEASE_NOTES.md 2015-06-29 10:26:01 +0000
+++ RELEASE_NOTES.md 2015-07-01 11:05:00 +0000
@@ -1,11 +1,6 @@
1Release notes1Release notes
2=============2=============
33
4Changes in version 0.6.20
5=========================
6 - Added Debug.Process.Timeout configuration parameter to Registry.ini
7 - Added Debug.Locate.Timeout configuration parameter to Zmq.ini
8
9Changes in version 0.6.194Changes in version 0.6.19
10=========================5=========================
11 - Support UNITY_SCOPES_CONFIG_DIR environment variable.6 - Support UNITY_SCOPES_CONFIG_DIR environment variable.
127
=== modified file 'debian/changelog'
--- debian/changelog 2015-06-29 10:26:01 +0000
+++ debian/changelog 2015-07-01 11:05:00 +0000
@@ -1,10 +1,3 @@
1unity-scopes-api (0.6.20-0ubuntu1) UNRELEASED; urgency=medium
2
3 * Added Debug.Process.Timeout configuration parameter to Registry.ini
4 * Added Debug.Locate.Timeout configuration parameter to Zmq.ini
5
6 -- Marcus Tomlinson <marcus.tomlinson@canonical.com> Mon, 29 Jun 2015 07:56:37 +0200
7
8unity-scopes-api (0.6.19+15.10.20150617.2-0ubuntu1) wily; urgency=medium1unity-scopes-api (0.6.19+15.10.20150617.2-0ubuntu1) wily; urgency=medium
92
10 [ Pawel Stolowski ]3 [ Pawel Stolowski ]
114
=== modified file 'debian/libunity-scopes3.symbols'
--- debian/libunity-scopes3.symbols 2015-06-29 09:04:07 +0000
+++ debian/libunity-scopes3.symbols 2015-07-01 11:05:00 +0000
@@ -395,7 +395,6 @@
395 (c++)"unity::scopes::internal::MiddlewareFactory::MiddlewareFactory(unity::scopes::internal::RuntimeImpl*)@Base" 0.4.0+14.04.20140312.1395 (c++)"unity::scopes::internal::MiddlewareFactory::MiddlewareFactory(unity::scopes::internal::RuntimeImpl*)@Base" 0.4.0+14.04.20140312.1
396 (c++)"unity::scopes::internal::MiddlewareFactory::to_kind(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.4.0+14.04.20140312.1396 (c++)"unity::scopes::internal::MiddlewareFactory::to_kind(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)@Base" 0.4.0+14.04.20140312.1
397 (c++)"unity::scopes::internal::RegistryConfig::click_installdir() const@Base" 0.4.3+14.10.20140428397 (c++)"unity::scopes::internal::RegistryConfig::click_installdir() const@Base" 0.4.3+14.10.20140428
398 (c++)"unity::scopes::internal::RegistryConfig::debug_process_timeout() const@Base" 0replaceme
399 (c++)"unity::scopes::internal::RegistryConfig::identity() const@Base" 0.4.0+14.04.20140312.1398 (c++)"unity::scopes::internal::RegistryConfig::identity() const@Base" 0.4.0+14.04.20140312.1
400 (c++)"unity::scopes::internal::RegistryConfig::mw_configfile() const@Base" 0.4.0+14.04.20140312.1399 (c++)"unity::scopes::internal::RegistryConfig::mw_configfile() const@Base" 0.4.0+14.04.20140312.1
401 (c++)"unity::scopes::internal::RegistryConfig::mw_kind() const@Base" 0.4.0+14.04.20140312.1400 (c++)"unity::scopes::internal::RegistryConfig::mw_kind() const@Base" 0.4.0+14.04.20140312.1
402401
=== modified file 'include/unity/scopes/internal/DfltConfig.h.in'
--- include/unity/scopes/internal/DfltConfig.h.in 2015-06-29 06:00:21 +0000
+++ include/unity/scopes/internal/DfltConfig.h.in 2015-07-01 11:05:00 +0000
@@ -46,15 +46,13 @@
4646
47static constexpr char const* DFLT_SS_SCOPE_IDENTITY = "SmartScope";47static constexpr char const* DFLT_SS_SCOPE_IDENTITY = "SmartScope";
4848
49static constexpr int DFLT_REAP_EXPIRY = 45; // seconds49static constexpr int DFLT_REAP_EXPIRY = 45; // seconds
50static constexpr int DFLT_REAP_INTERVAL = 10; // seconds50static constexpr int DFLT_REAP_INTERVAL = 10; // seconds
51static constexpr int DFLT_PROCESS_TIMEOUT = 4000; // milliseconds51static constexpr int DFLT_PROCESS_TIMEOUT = 4000; // milliseconds
52static constexpr int DFLT_DEBUG_PROCESS_TIMEOUT = 30000; // milliseconds52static constexpr int DFLT_ZMQ_TWOWAY_TIMEOUT = 500; // milliseconds
53static constexpr int DFLT_ZMQ_TWOWAY_TIMEOUT = 500; // milliseconds53static constexpr int DFLT_ZMQ_LOCATE_TIMEOUT = 5000; // milliseconds
54static constexpr int DFLT_ZMQ_LOCATE_TIMEOUT = 5000; // milliseconds54static constexpr int DFLT_ZMQ_REGISTRY_TIMEOUT = 5000; // milliseconds
55static constexpr int DFLT_ZMQ_DEBUG_LOCATE_TIMEOUT = 30000; // milliseconds55static constexpr int DFLT_ZMQ_CHILDSCOPES_TIMEOUT = 2000; // milliseconds
56static constexpr int DFLT_ZMQ_REGISTRY_TIMEOUT = 5000; // milliseconds
57static constexpr int DFLT_ZMQ_CHILDSCOPES_TIMEOUT = 2000; // milliseconds
5856
59static constexpr char const* DFLT_HOME_CACHE_SUBDIR = ".local/share/unity-scopes";57static constexpr char const* DFLT_HOME_CACHE_SUBDIR = ".local/share/unity-scopes";
60static constexpr char const* DFLT_HOME_APP_SUBDIR = ".local/share";58static constexpr char const* DFLT_HOME_APP_SUBDIR = ".local/share";
6159
=== modified file 'include/unity/scopes/internal/RegistryConfig.h'
--- include/unity/scopes/internal/RegistryConfig.h 2015-06-29 06:02:37 +0000
+++ include/unity/scopes/internal/RegistryConfig.h 2015-07-01 11:05:00 +0000
@@ -43,7 +43,6 @@
43 std::string click_installdir() const; // Directory for Click scope config files43 std::string click_installdir() const; // Directory for Click scope config files
44 std::string scoperunner_path() const; // Path to scoperunner binary44 std::string scoperunner_path() const; // Path to scoperunner binary
45 int process_timeout() const; // Milliseconds to wait before scope is considereed non-responsive.45 int process_timeout() const; // Milliseconds to wait before scope is considereed non-responsive.
46 int debug_process_timeout() const; // Milliseconds to wait before scope is considereed non-responsive in debug mode.
4746
48private:47private:
49 std::string identity_;48 std::string identity_;
@@ -54,7 +53,6 @@
54 std::string click_installdir_;53 std::string click_installdir_;
55 std::string scoperunner_path_;54 std::string scoperunner_path_;
56 int process_timeout_; // Milliseconds55 int process_timeout_; // Milliseconds
57 int debug_process_timeout_; // Milliseconds
58};56};
5957
60} // namespace internal58} // namespace internal
6159
=== modified file 'include/unity/scopes/internal/zmq_middleware/ZmqConfig.h'
--- include/unity/scopes/internal/zmq_middleware/ZmqConfig.h 2015-06-29 06:02:37 +0000
+++ include/unity/scopes/internal/zmq_middleware/ZmqConfig.h 2015-07-01 11:05:00 +0000
@@ -38,7 +38,6 @@
38 std::string endpoint_dir() const;38 std::string endpoint_dir() const;
39 int twoway_timeout() const;39 int twoway_timeout() const;
40 int locate_timeout() const;40 int locate_timeout() const;
41 int debug_locate_timeout() const;
42 int registry_timeout() const;41 int registry_timeout() const;
43 int child_scopes_timeout() const;42 int child_scopes_timeout() const;
44 std::string registry_endpoint_dir() const;43 std::string registry_endpoint_dir() const;
@@ -48,7 +47,6 @@
48 std::string endpoint_dir_;47 std::string endpoint_dir_;
49 int twoway_timeout_;48 int twoway_timeout_;
50 int locate_timeout_;49 int locate_timeout_;
51 int debug_locate_timeout_;
52 int registry_timeout_;50 int registry_timeout_;
53 int child_scopes_timeout_;51 int child_scopes_timeout_;
54 std::string registry_endpoint_dir_;52 std::string registry_endpoint_dir_;
5553
=== modified file 'include/unity/scopes/internal/zmq_middleware/ZmqMiddleware.h'
--- include/unity/scopes/internal/zmq_middleware/ZmqMiddleware.h 2015-06-29 06:08:25 +0000
+++ include/unity/scopes/internal/zmq_middleware/ZmqMiddleware.h 2015-07-01 11:05:00 +0000
@@ -93,7 +93,6 @@
93 ThreadPool* oneway_pool();93 ThreadPool* oneway_pool();
94 ThreadPool* twoway_pool();94 ThreadPool* twoway_pool();
95 int64_t locate_timeout() const noexcept;95 int64_t locate_timeout() const noexcept;
96 int64_t debug_locate_timeout() const noexcept;
97 int64_t registry_timeout() const noexcept;96 int64_t registry_timeout() const noexcept;
98 int64_t child_scopes_timeout() const noexcept;97 int64_t child_scopes_timeout() const noexcept;
9998
@@ -139,7 +138,6 @@
139138
140 int64_t twoway_timeout_; // Default timeout for twoway invocations139 int64_t twoway_timeout_; // Default timeout for twoway invocations
141 int64_t locate_timeout_; // Timeout for registry locate()140 int64_t locate_timeout_; // Timeout for registry locate()
142 int64_t debug_locate_timeout_; // Timeout for registry locate() in debug mode
143 int64_t registry_timeout_; // Timeout for registry operations other than locate()141 int64_t registry_timeout_; // Timeout for registry operations other than locate()
144 int64_t child_scopes_timeout_; // Timeout for child_scopes() and set_child_scopes() methods142 int64_t child_scopes_timeout_; // Timeout for child_scopes() and set_child_scopes() methods
145143
146144
=== modified file 'scoperegistry/scoperegistry.cpp'
--- scoperegistry/scoperegistry.cpp 2015-06-29 12:51:07 +0000
+++ scoperegistry/scoperegistry.cpp 2015-07-01 11:05:00 +0000
@@ -293,8 +293,7 @@
293 string const& scoperunner_path,293 string const& scoperunner_path,
294 string const& config_file,294 string const& config_file,
295 bool click,295 bool click,
296 int timeout_ms,296 int timeout_ms)
297 int debug_timeout_ms)
298{297{
299 unique_ptr<ScopeMetadataImpl> mi(new ScopeMetadataImpl(mw.get()));298 unique_ptr<ScopeMetadataImpl> mi(new ScopeMetadataImpl(mw.get()));
300 string scope_config(scope.second);299 string scope_config(scope.second);
@@ -424,10 +423,10 @@
424 scope_dir.filename().native();423 scope_dir.filename().native();
425 }424 }
426425
427 // Check if this scope has requested debug mode, if so, set the process timeout to debug_process_timeout426 // Check if this scope has requested debug mode, if so, set the process timeout to 30s
428 if (sc.debug_mode())427 if (sc.debug_mode())
429 {428 {
430 exec_data.timeout_ms = debug_timeout_ms;429 exec_data.timeout_ms = 30000;
431 }430 }
432 else431 else
433 {432 {
@@ -480,14 +479,13 @@
480 string const& scoperunner_path,479 string const& scoperunner_path,
481 string const& config_file,480 string const& config_file,
482 bool click,481 bool click,
483 int timeout_ms,482 int timeout_ms)
484 int debug_timeout_ms)
485{483{
486 for (auto&& pair : all_scopes)484 for (auto&& pair : all_scopes)
487 {485 {
488 try486 try
489 {487 {
490 add_local_scope(registry, pair, mw, scoperunner_path, config_file, click, timeout_ms, debug_timeout_ms);488 add_local_scope(registry, pair, mw, scoperunner_path, config_file, click, timeout_ms);
491 }489 }
492 catch (unity::Exception const& e)490 catch (unity::Exception const& e)
493 {491 {
@@ -557,7 +555,6 @@
557 string click_installdir;555 string click_installdir;
558 string scoperunner_path;556 string scoperunner_path;
559 int process_timeout;557 int process_timeout;
560 int debug_process_timeout;
561 {558 {
562 RegistryConfig c(identity, runtime->registry_configfile());559 RegistryConfig c(identity, runtime->registry_configfile());
563 mw_kind = c.mw_kind();560 mw_kind = c.mw_kind();
@@ -566,7 +563,6 @@
566 click_installdir = c.click_installdir();563 click_installdir = c.click_installdir();
567 scoperunner_path = c.scoperunner_path();564 scoperunner_path = c.scoperunner_path();
568 process_timeout = c.process_timeout();565 process_timeout = c.process_timeout();
569 debug_process_timeout = c.debug_process_timeout();
570 } // Release memory for config parser566 } // Release memory for config parser
571567
572 // Inform the signal thread that it should shutdown the runtime568 // Inform the signal thread that it should shutdown the runtime
@@ -607,8 +603,8 @@
607 local_scopes[scope_id] = argv[i]; // operator[] overwrites pre-existing entries603 local_scopes[scope_id] = argv[i]; // operator[] overwrites pre-existing entries
608 }604 }
609605
610 add_local_scopes(registry, local_scopes, middleware, scoperunner_path, config_file, false, process_timeout, debug_process_timeout);606 add_local_scopes(registry, local_scopes, middleware, scoperunner_path, config_file, false, process_timeout);
611 add_local_scopes(registry, click_scopes, middleware, scoperunner_path, config_file, true, process_timeout, debug_process_timeout);607 add_local_scopes(registry, click_scopes, middleware, scoperunner_path, config_file, true, process_timeout);
612 if (ss_reg_id.empty())608 if (ss_reg_id.empty())
613 {609 {
614 error("no remote registry configured, only local scopes will be available");610 error("no remote registry configured, only local scopes will be available");
@@ -619,12 +615,12 @@
619 }615 }
620616
621 // Configure watches for scope install directories617 // Configure watches for scope install directories
622 auto local_watch_lambda = [registry, &middleware, &scoperunner_path, &config_file, process_timeout, debug_process_timeout]618 auto local_watch_lambda = [registry, &middleware, &scoperunner_path, &config_file, process_timeout]
623 (pair<string, string> const& scope)619 (pair<string, string> const& scope)
624 {620 {
625 try621 try
626 {622 {
627 add_local_scope(registry, scope, middleware, scoperunner_path, config_file, false, process_timeout, debug_process_timeout);623 add_local_scope(registry, scope, middleware, scoperunner_path, config_file, false, process_timeout);
628 }624 }
629 catch (unity::Exception const& e)625 catch (unity::Exception const& e)
630 {626 {
@@ -635,12 +631,12 @@
635 local_scopes_watcher.add_install_dir(scope_installdir);631 local_scopes_watcher.add_install_dir(scope_installdir);
636 local_scopes_watcher.add_install_dir(oem_installdir);632 local_scopes_watcher.add_install_dir(oem_installdir);
637633
638 auto click_watch_lambda = [registry, &middleware, &scoperunner_path, &config_file, process_timeout, debug_process_timeout]634 auto click_watch_lambda = [registry, &middleware, &scoperunner_path, &config_file, process_timeout]
639 (pair<string, string> const& scope)635 (pair<string, string> const& scope)
640 {636 {
641 try637 try
642 {638 {
643 add_local_scope(registry, scope, middleware, scoperunner_path, config_file, true, process_timeout, debug_process_timeout);639 add_local_scope(registry, scope, middleware, scoperunner_path, config_file, true, process_timeout);
644 }640 }
645 catch (unity::Exception const& e)641 catch (unity::Exception const& e)
646 {642 {
647643
=== modified file 'src/scopes/internal/RegistryConfig.cpp'
--- src/scopes/internal/RegistryConfig.cpp 2015-06-29 15:07:42 +0000
+++ src/scopes/internal/RegistryConfig.cpp 2015-07-01 11:05:00 +0000
@@ -45,7 +45,6 @@
45 const string click_installdir_key = "Click.InstallDir";45 const string click_installdir_key = "Click.InstallDir";
46 const string scoperunner_path_key = "Scoperunner.Path";46 const string scoperunner_path_key = "Scoperunner.Path";
47 const string process_timeout_key = "Process.Timeout";47 const string process_timeout_key = "Process.Timeout";
48 const string debug_process_timeout_key = "Debug.Process.Timeout";
49}48}
5049
51RegistryConfig::RegistryConfig(string const& identity, string const& configfile) :50RegistryConfig::RegistryConfig(string const& identity, string const& configfile) :
@@ -80,11 +79,6 @@
80 {79 {
81 throw_ex("Illegal value (" + to_string(process_timeout_) + ") for " + process_timeout_key + ": value must be 10-15000 ms");80 throw_ex("Illegal value (" + to_string(process_timeout_) + ") for " + process_timeout_key + ": value must be 10-15000 ms");
82 }81 }
83 debug_process_timeout_ = get_optional_int(registry_config_group, debug_process_timeout_key, DFLT_DEBUG_PROCESS_TIMEOUT);
84 if (debug_process_timeout_ < 10 || debug_process_timeout_ > 120000)
85 {
86 throw_ex("Illegal value (" + to_string(debug_process_timeout_) + ") for " + debug_process_timeout_key + ": value must be 10-120000 ms");
87 }
8882
89 KnownEntries const known_entries = {83 KnownEntries const known_entries = {
90 { registry_config_group,84 { registry_config_group,
@@ -95,8 +89,7 @@
95 oem_installdir_key,89 oem_installdir_key,
96 click_installdir_key,90 click_installdir_key,
97 scoperunner_path_key,91 scoperunner_path_key,
98 process_timeout_key,92 process_timeout_key
99 debug_process_timeout_key
100 }93 }
101 }94 }
102 };95 };
@@ -147,11 +140,6 @@
147 return process_timeout_;140 return process_timeout_;
148}141}
149142
150int RegistryConfig::debug_process_timeout() const
151{
152 return debug_process_timeout_;
153}
154
155} // namespace internal143} // namespace internal
156144
157} // namespace scopes145} // namespace scopes
158146
=== modified file 'src/scopes/internal/zmq_middleware/ZmqConfig.cpp'
--- src/scopes/internal/zmq_middleware/ZmqConfig.cpp 2015-06-29 15:09:24 +0000
+++ src/scopes/internal/zmq_middleware/ZmqConfig.cpp 2015-07-01 11:05:00 +0000
@@ -41,7 +41,6 @@
41 const string endpoint_dir_key = "EndpointDir";41 const string endpoint_dir_key = "EndpointDir";
42 const string twoway_timeout_key = "Default.Twoway.Timeout";42 const string twoway_timeout_key = "Default.Twoway.Timeout";
43 const string locate_timeout_key = "Locate.Timeout";43 const string locate_timeout_key = "Locate.Timeout";
44 const string debug_locate_timeout_key = "Debug.Locate.Timeout";
45 const string registry_timeout_key = "Registry.Timeout";44 const string registry_timeout_key = "Registry.Timeout";
46 const string child_scopes_timeout_key = "ChildScopes.Timeout";45 const string child_scopes_timeout_key = "ChildScopes.Timeout";
47 const string registry_endpoint_dir_key = "Registry.EndpointDir";46 const string registry_endpoint_dir_key = "Registry.EndpointDir";
@@ -92,12 +91,6 @@
92 throw_ex("Illegal value (" + to_string(locate_timeout_) + ") for " + locate_timeout_key + ": value must be 10-15000");91 throw_ex("Illegal value (" + to_string(locate_timeout_) + ") for " + locate_timeout_key + ": value must be 10-15000");
93 }92 }
9493
95 debug_locate_timeout_ = get_optional_int(zmq_config_group, debug_locate_timeout_key, DFLT_ZMQ_DEBUG_LOCATE_TIMEOUT);
96 if (debug_locate_timeout_ < 10 || debug_locate_timeout_ > 120000)
97 {
98 throw_ex("Illegal value (" + to_string(debug_locate_timeout_) + ") for " + debug_locate_timeout_key + ": value must be 10-120000");
99 }
100
101 child_scopes_timeout_ = get_optional_int(zmq_config_group, child_scopes_timeout_key, DFLT_ZMQ_CHILDSCOPES_TIMEOUT);94 child_scopes_timeout_ = get_optional_int(zmq_config_group, child_scopes_timeout_key, DFLT_ZMQ_CHILDSCOPES_TIMEOUT);
102 if (child_scopes_timeout_ < 10 || child_scopes_timeout_ > 15000)95 if (child_scopes_timeout_ < 10 || child_scopes_timeout_ > 15000)
103 {96 {
@@ -113,7 +106,6 @@
113 endpoint_dir_key,106 endpoint_dir_key,
114 twoway_timeout_key,107 twoway_timeout_key,
115 locate_timeout_key,108 locate_timeout_key,
116 debug_locate_timeout_key,
117 registry_timeout_key,109 registry_timeout_key,
118 child_scopes_timeout_key,110 child_scopes_timeout_key,
119 registry_endpoint_dir_key,111 registry_endpoint_dir_key,
@@ -143,11 +135,6 @@
143 return locate_timeout_;135 return locate_timeout_;
144}136}
145137
146int ZmqConfig::debug_locate_timeout() const
147{
148 return debug_locate_timeout_;
149}
150
151int ZmqConfig::registry_timeout() const138int ZmqConfig::registry_timeout() const
152{139{
153 return registry_timeout_;140 return registry_timeout_;
154141
=== modified file 'src/scopes/internal/zmq_middleware/ZmqMiddleware.cpp'
--- src/scopes/internal/zmq_middleware/ZmqMiddleware.cpp 2015-06-29 06:11:47 +0000
+++ src/scopes/internal/zmq_middleware/ZmqMiddleware.cpp 2015-07-01 11:05:00 +0000
@@ -106,7 +106,6 @@
106106
107 twoway_timeout_ = config.twoway_timeout();107 twoway_timeout_ = config.twoway_timeout();
108 locate_timeout_ = config.locate_timeout();108 locate_timeout_ = config.locate_timeout();
109 debug_locate_timeout_ = config.debug_locate_timeout();
110 registry_timeout_ = config.registry_timeout();109 registry_timeout_ = config.registry_timeout();
111 child_scopes_timeout_ = config.child_scopes_timeout();110 child_scopes_timeout_ = config.child_scopes_timeout();
112 public_endpoint_dir_ = config.endpoint_dir();111 public_endpoint_dir_ = config.endpoint_dir();
@@ -811,11 +810,6 @@
811 return locate_timeout_;810 return locate_timeout_;
812}811}
813812
814int64_t ZmqMiddleware::debug_locate_timeout() const noexcept
815{
816 return debug_locate_timeout_;
817}
818
819int64_t ZmqMiddleware::registry_timeout() const noexcept813int64_t ZmqMiddleware::registry_timeout() const noexcept
820{814{
821 return registry_timeout_;815 return registry_timeout_;
822816
=== modified file 'src/scopes/internal/zmq_middleware/ZmqScope.cpp'
--- src/scopes/internal/zmq_middleware/ZmqScope.cpp 2015-06-29 06:13:53 +0000
+++ src/scopes/internal/zmq_middleware/ZmqScope.cpp 2015-07-01 11:05:00 +0000
@@ -325,8 +325,7 @@
325 capnp::MallocMessageBuilder request_builder;325 capnp::MallocMessageBuilder request_builder;
326 make_request_(request_builder, "debug_mode");326 make_request_(request_builder, "debug_mode");
327327
328 int64_t timeout = mw_base()->debug_locate_timeout();328 auto future = mw_base()->twoway_pool()->submit([&] { return this->invoke_twoway_(request_builder, -1, 30000); });
329 auto future = mw_base()->twoway_pool()->submit([&] { return this->invoke_twoway_(request_builder, -1, timeout); });
330 auto out_params = future.get();329 auto out_params = future.get();
331 auto response = out_params.reader->getRoot<capnproto::Response>();330 auto response = out_params.reader->getRoot<capnproto::Response>();
332 throw_if_runtime_exception(response);331 throw_if_runtime_exception(response);
@@ -346,11 +345,10 @@
346ZmqObjectProxy::TwowayOutParams ZmqScope::invoke_scope_(capnp::MessageBuilder& in_params, int64_t timeout)345ZmqObjectProxy::TwowayOutParams ZmqScope::invoke_scope_(capnp::MessageBuilder& in_params, int64_t timeout)
347{346{
348 // Check if this scope has requested debug mode, if so, disable two-way timeout and set347 // Check if this scope has requested debug mode, if so, disable two-way timeout and set
349 // locate timeout to debug_locate_timeout.348 // locate timeout to 30s.
350 if (debug_mode())349 if (debug_mode())
351 {350 {
352 int64_t timeout = mw_base()->debug_locate_timeout();351 return this->invoke_twoway_(in_params, -1, 30000);
353 return this->invoke_twoway_(in_params, -1, timeout);
354 }352 }
355 return this->invoke_twoway_(in_params, timeout);353 return this->invoke_twoway_(in_params, timeout);
356}354}

Subscribers

People subscribed via source and target branches

to all changes: