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
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2015-06-29 10:26:01 +0000
3+++ CMakeLists.txt 2015-07-01 11:05:00 +0000
4@@ -218,7 +218,7 @@
5 # API version
6 set(UNITY_SCOPES_MAJOR 0)
7 set(UNITY_SCOPES_MINOR 6)
8-set(UNITY_SCOPES_MICRO 20)
9+set(UNITY_SCOPES_MICRO 19)
10 set(UNITY_SCOPES_SOVERSION 3)
11
12 # Version for testing, with all symbols visible
13
14=== modified file 'CONFIGFILES'
15--- CONFIGFILES 2015-06-29 12:58:18 +0000
16+++ CONFIGFILES 2015-07-01 11:05:00 +0000
17@@ -226,15 +226,6 @@
18
19 The default value is 5000 milliseconds.
20
21-- Debug.Locate.Timeout
22-
23- This parameter overrides the value of Locate.Timeout above when DebugMode is enabled on
24- a target scope. (See DebugMode in <scope_id>.ini for more details)
25-
26- Only values in the range 10 to 120000 milliseconds are accepted.
27-
28- The default value is 30000 milliseconds.
29-
30 - Registry.Timeout
31
32 The timeout to be used when invoking a twoway operation on the registry other
33@@ -315,15 +306,6 @@
34 config group, otherwise the middleware can prematurely conclude that
35 a locate() request failed to start a scope.
36
37-- Debug.Process.Timeout
38-
39- This parameter overrides the value of Process.Timeout above when DebugMode is enabled on
40- a target scope. (See DebugMode in <scope_id>.ini for more details)
41-
42- Only values in the range 10 to 120000 milliseconds are accepted.
43-
44- The default value is 30000 milliseconds.
45-
46
47 Smartscopes.ini
48 --------------
49
50=== modified file 'RELEASE_NOTES.md'
51--- RELEASE_NOTES.md 2015-06-29 10:26:01 +0000
52+++ RELEASE_NOTES.md 2015-07-01 11:05:00 +0000
53@@ -1,11 +1,6 @@
54 Release notes
55 =============
56
57-Changes in version 0.6.20
58-=========================
59- - Added Debug.Process.Timeout configuration parameter to Registry.ini
60- - Added Debug.Locate.Timeout configuration parameter to Zmq.ini
61-
62 Changes in version 0.6.19
63 =========================
64 - Support UNITY_SCOPES_CONFIG_DIR environment variable.
65
66=== modified file 'debian/changelog'
67--- debian/changelog 2015-06-29 10:26:01 +0000
68+++ debian/changelog 2015-07-01 11:05:00 +0000
69@@ -1,10 +1,3 @@
70-unity-scopes-api (0.6.20-0ubuntu1) UNRELEASED; urgency=medium
71-
72- * Added Debug.Process.Timeout configuration parameter to Registry.ini
73- * Added Debug.Locate.Timeout configuration parameter to Zmq.ini
74-
75- -- Marcus Tomlinson <marcus.tomlinson@canonical.com> Mon, 29 Jun 2015 07:56:37 +0200
76-
77 unity-scopes-api (0.6.19+15.10.20150617.2-0ubuntu1) wily; urgency=medium
78
79 [ Pawel Stolowski ]
80
81=== modified file 'debian/libunity-scopes3.symbols'
82--- debian/libunity-scopes3.symbols 2015-06-29 09:04:07 +0000
83+++ debian/libunity-scopes3.symbols 2015-07-01 11:05:00 +0000
84@@ -395,7 +395,6 @@
85 (c++)"unity::scopes::internal::MiddlewareFactory::MiddlewareFactory(unity::scopes::internal::RuntimeImpl*)@Base" 0.4.0+14.04.20140312.1
86 (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
87 (c++)"unity::scopes::internal::RegistryConfig::click_installdir() const@Base" 0.4.3+14.10.20140428
88- (c++)"unity::scopes::internal::RegistryConfig::debug_process_timeout() const@Base" 0replaceme
89 (c++)"unity::scopes::internal::RegistryConfig::identity() const@Base" 0.4.0+14.04.20140312.1
90 (c++)"unity::scopes::internal::RegistryConfig::mw_configfile() const@Base" 0.4.0+14.04.20140312.1
91 (c++)"unity::scopes::internal::RegistryConfig::mw_kind() const@Base" 0.4.0+14.04.20140312.1
92
93=== modified file 'include/unity/scopes/internal/DfltConfig.h.in'
94--- include/unity/scopes/internal/DfltConfig.h.in 2015-06-29 06:00:21 +0000
95+++ include/unity/scopes/internal/DfltConfig.h.in 2015-07-01 11:05:00 +0000
96@@ -46,15 +46,13 @@
97
98 static constexpr char const* DFLT_SS_SCOPE_IDENTITY = "SmartScope";
99
100-static constexpr int DFLT_REAP_EXPIRY = 45; // seconds
101-static constexpr int DFLT_REAP_INTERVAL = 10; // seconds
102-static constexpr int DFLT_PROCESS_TIMEOUT = 4000; // milliseconds
103-static constexpr int DFLT_DEBUG_PROCESS_TIMEOUT = 30000; // milliseconds
104-static constexpr int DFLT_ZMQ_TWOWAY_TIMEOUT = 500; // milliseconds
105-static constexpr int DFLT_ZMQ_LOCATE_TIMEOUT = 5000; // milliseconds
106-static constexpr int DFLT_ZMQ_DEBUG_LOCATE_TIMEOUT = 30000; // milliseconds
107-static constexpr int DFLT_ZMQ_REGISTRY_TIMEOUT = 5000; // milliseconds
108-static constexpr int DFLT_ZMQ_CHILDSCOPES_TIMEOUT = 2000; // milliseconds
109+static constexpr int DFLT_REAP_EXPIRY = 45; // seconds
110+static constexpr int DFLT_REAP_INTERVAL = 10; // seconds
111+static constexpr int DFLT_PROCESS_TIMEOUT = 4000; // milliseconds
112+static constexpr int DFLT_ZMQ_TWOWAY_TIMEOUT = 500; // milliseconds
113+static constexpr int DFLT_ZMQ_LOCATE_TIMEOUT = 5000; // milliseconds
114+static constexpr int DFLT_ZMQ_REGISTRY_TIMEOUT = 5000; // milliseconds
115+static constexpr int DFLT_ZMQ_CHILDSCOPES_TIMEOUT = 2000; // milliseconds
116
117 static constexpr char const* DFLT_HOME_CACHE_SUBDIR = ".local/share/unity-scopes";
118 static constexpr char const* DFLT_HOME_APP_SUBDIR = ".local/share";
119
120=== modified file 'include/unity/scopes/internal/RegistryConfig.h'
121--- include/unity/scopes/internal/RegistryConfig.h 2015-06-29 06:02:37 +0000
122+++ include/unity/scopes/internal/RegistryConfig.h 2015-07-01 11:05:00 +0000
123@@ -43,7 +43,6 @@
124 std::string click_installdir() const; // Directory for Click scope config files
125 std::string scoperunner_path() const; // Path to scoperunner binary
126 int process_timeout() const; // Milliseconds to wait before scope is considereed non-responsive.
127- int debug_process_timeout() const; // Milliseconds to wait before scope is considereed non-responsive in debug mode.
128
129 private:
130 std::string identity_;
131@@ -54,7 +53,6 @@
132 std::string click_installdir_;
133 std::string scoperunner_path_;
134 int process_timeout_; // Milliseconds
135- int debug_process_timeout_; // Milliseconds
136 };
137
138 } // namespace internal
139
140=== modified file 'include/unity/scopes/internal/zmq_middleware/ZmqConfig.h'
141--- include/unity/scopes/internal/zmq_middleware/ZmqConfig.h 2015-06-29 06:02:37 +0000
142+++ include/unity/scopes/internal/zmq_middleware/ZmqConfig.h 2015-07-01 11:05:00 +0000
143@@ -38,7 +38,6 @@
144 std::string endpoint_dir() const;
145 int twoway_timeout() const;
146 int locate_timeout() const;
147- int debug_locate_timeout() const;
148 int registry_timeout() const;
149 int child_scopes_timeout() const;
150 std::string registry_endpoint_dir() const;
151@@ -48,7 +47,6 @@
152 std::string endpoint_dir_;
153 int twoway_timeout_;
154 int locate_timeout_;
155- int debug_locate_timeout_;
156 int registry_timeout_;
157 int child_scopes_timeout_;
158 std::string registry_endpoint_dir_;
159
160=== modified file 'include/unity/scopes/internal/zmq_middleware/ZmqMiddleware.h'
161--- include/unity/scopes/internal/zmq_middleware/ZmqMiddleware.h 2015-06-29 06:08:25 +0000
162+++ include/unity/scopes/internal/zmq_middleware/ZmqMiddleware.h 2015-07-01 11:05:00 +0000
163@@ -93,7 +93,6 @@
164 ThreadPool* oneway_pool();
165 ThreadPool* twoway_pool();
166 int64_t locate_timeout() const noexcept;
167- int64_t debug_locate_timeout() const noexcept;
168 int64_t registry_timeout() const noexcept;
169 int64_t child_scopes_timeout() const noexcept;
170
171@@ -139,7 +138,6 @@
172
173 int64_t twoway_timeout_; // Default timeout for twoway invocations
174 int64_t locate_timeout_; // Timeout for registry locate()
175- int64_t debug_locate_timeout_; // Timeout for registry locate() in debug mode
176 int64_t registry_timeout_; // Timeout for registry operations other than locate()
177 int64_t child_scopes_timeout_; // Timeout for child_scopes() and set_child_scopes() methods
178
179
180=== modified file 'scoperegistry/scoperegistry.cpp'
181--- scoperegistry/scoperegistry.cpp 2015-06-29 12:51:07 +0000
182+++ scoperegistry/scoperegistry.cpp 2015-07-01 11:05:00 +0000
183@@ -293,8 +293,7 @@
184 string const& scoperunner_path,
185 string const& config_file,
186 bool click,
187- int timeout_ms,
188- int debug_timeout_ms)
189+ int timeout_ms)
190 {
191 unique_ptr<ScopeMetadataImpl> mi(new ScopeMetadataImpl(mw.get()));
192 string scope_config(scope.second);
193@@ -424,10 +423,10 @@
194 scope_dir.filename().native();
195 }
196
197- // Check if this scope has requested debug mode, if so, set the process timeout to debug_process_timeout
198+ // Check if this scope has requested debug mode, if so, set the process timeout to 30s
199 if (sc.debug_mode())
200 {
201- exec_data.timeout_ms = debug_timeout_ms;
202+ exec_data.timeout_ms = 30000;
203 }
204 else
205 {
206@@ -480,14 +479,13 @@
207 string const& scoperunner_path,
208 string const& config_file,
209 bool click,
210- int timeout_ms,
211- int debug_timeout_ms)
212+ int timeout_ms)
213 {
214 for (auto&& pair : all_scopes)
215 {
216 try
217 {
218- add_local_scope(registry, pair, mw, scoperunner_path, config_file, click, timeout_ms, debug_timeout_ms);
219+ add_local_scope(registry, pair, mw, scoperunner_path, config_file, click, timeout_ms);
220 }
221 catch (unity::Exception const& e)
222 {
223@@ -557,7 +555,6 @@
224 string click_installdir;
225 string scoperunner_path;
226 int process_timeout;
227- int debug_process_timeout;
228 {
229 RegistryConfig c(identity, runtime->registry_configfile());
230 mw_kind = c.mw_kind();
231@@ -566,7 +563,6 @@
232 click_installdir = c.click_installdir();
233 scoperunner_path = c.scoperunner_path();
234 process_timeout = c.process_timeout();
235- debug_process_timeout = c.debug_process_timeout();
236 } // Release memory for config parser
237
238 // Inform the signal thread that it should shutdown the runtime
239@@ -607,8 +603,8 @@
240 local_scopes[scope_id] = argv[i]; // operator[] overwrites pre-existing entries
241 }
242
243- add_local_scopes(registry, local_scopes, middleware, scoperunner_path, config_file, false, process_timeout, debug_process_timeout);
244- add_local_scopes(registry, click_scopes, middleware, scoperunner_path, config_file, true, process_timeout, debug_process_timeout);
245+ add_local_scopes(registry, local_scopes, middleware, scoperunner_path, config_file, false, process_timeout);
246+ add_local_scopes(registry, click_scopes, middleware, scoperunner_path, config_file, true, process_timeout);
247 if (ss_reg_id.empty())
248 {
249 error("no remote registry configured, only local scopes will be available");
250@@ -619,12 +615,12 @@
251 }
252
253 // Configure watches for scope install directories
254- auto local_watch_lambda = [registry, &middleware, &scoperunner_path, &config_file, process_timeout, debug_process_timeout]
255+ auto local_watch_lambda = [registry, &middleware, &scoperunner_path, &config_file, process_timeout]
256 (pair<string, string> const& scope)
257 {
258 try
259 {
260- add_local_scope(registry, scope, middleware, scoperunner_path, config_file, false, process_timeout, debug_process_timeout);
261+ add_local_scope(registry, scope, middleware, scoperunner_path, config_file, false, process_timeout);
262 }
263 catch (unity::Exception const& e)
264 {
265@@ -635,12 +631,12 @@
266 local_scopes_watcher.add_install_dir(scope_installdir);
267 local_scopes_watcher.add_install_dir(oem_installdir);
268
269- auto click_watch_lambda = [registry, &middleware, &scoperunner_path, &config_file, process_timeout, debug_process_timeout]
270+ auto click_watch_lambda = [registry, &middleware, &scoperunner_path, &config_file, process_timeout]
271 (pair<string, string> const& scope)
272 {
273 try
274 {
275- add_local_scope(registry, scope, middleware, scoperunner_path, config_file, true, process_timeout, debug_process_timeout);
276+ add_local_scope(registry, scope, middleware, scoperunner_path, config_file, true, process_timeout);
277 }
278 catch (unity::Exception const& e)
279 {
280
281=== modified file 'src/scopes/internal/RegistryConfig.cpp'
282--- src/scopes/internal/RegistryConfig.cpp 2015-06-29 15:07:42 +0000
283+++ src/scopes/internal/RegistryConfig.cpp 2015-07-01 11:05:00 +0000
284@@ -45,7 +45,6 @@
285 const string click_installdir_key = "Click.InstallDir";
286 const string scoperunner_path_key = "Scoperunner.Path";
287 const string process_timeout_key = "Process.Timeout";
288- const string debug_process_timeout_key = "Debug.Process.Timeout";
289 }
290
291 RegistryConfig::RegistryConfig(string const& identity, string const& configfile) :
292@@ -80,11 +79,6 @@
293 {
294 throw_ex("Illegal value (" + to_string(process_timeout_) + ") for " + process_timeout_key + ": value must be 10-15000 ms");
295 }
296- debug_process_timeout_ = get_optional_int(registry_config_group, debug_process_timeout_key, DFLT_DEBUG_PROCESS_TIMEOUT);
297- if (debug_process_timeout_ < 10 || debug_process_timeout_ > 120000)
298- {
299- throw_ex("Illegal value (" + to_string(debug_process_timeout_) + ") for " + debug_process_timeout_key + ": value must be 10-120000 ms");
300- }
301
302 KnownEntries const known_entries = {
303 { registry_config_group,
304@@ -95,8 +89,7 @@
305 oem_installdir_key,
306 click_installdir_key,
307 scoperunner_path_key,
308- process_timeout_key,
309- debug_process_timeout_key
310+ process_timeout_key
311 }
312 }
313 };
314@@ -147,11 +140,6 @@
315 return process_timeout_;
316 }
317
318-int RegistryConfig::debug_process_timeout() const
319-{
320- return debug_process_timeout_;
321-}
322-
323 } // namespace internal
324
325 } // namespace scopes
326
327=== modified file 'src/scopes/internal/zmq_middleware/ZmqConfig.cpp'
328--- src/scopes/internal/zmq_middleware/ZmqConfig.cpp 2015-06-29 15:09:24 +0000
329+++ src/scopes/internal/zmq_middleware/ZmqConfig.cpp 2015-07-01 11:05:00 +0000
330@@ -41,7 +41,6 @@
331 const string endpoint_dir_key = "EndpointDir";
332 const string twoway_timeout_key = "Default.Twoway.Timeout";
333 const string locate_timeout_key = "Locate.Timeout";
334- const string debug_locate_timeout_key = "Debug.Locate.Timeout";
335 const string registry_timeout_key = "Registry.Timeout";
336 const string child_scopes_timeout_key = "ChildScopes.Timeout";
337 const string registry_endpoint_dir_key = "Registry.EndpointDir";
338@@ -92,12 +91,6 @@
339 throw_ex("Illegal value (" + to_string(locate_timeout_) + ") for " + locate_timeout_key + ": value must be 10-15000");
340 }
341
342- debug_locate_timeout_ = get_optional_int(zmq_config_group, debug_locate_timeout_key, DFLT_ZMQ_DEBUG_LOCATE_TIMEOUT);
343- if (debug_locate_timeout_ < 10 || debug_locate_timeout_ > 120000)
344- {
345- throw_ex("Illegal value (" + to_string(debug_locate_timeout_) + ") for " + debug_locate_timeout_key + ": value must be 10-120000");
346- }
347-
348 child_scopes_timeout_ = get_optional_int(zmq_config_group, child_scopes_timeout_key, DFLT_ZMQ_CHILDSCOPES_TIMEOUT);
349 if (child_scopes_timeout_ < 10 || child_scopes_timeout_ > 15000)
350 {
351@@ -113,7 +106,6 @@
352 endpoint_dir_key,
353 twoway_timeout_key,
354 locate_timeout_key,
355- debug_locate_timeout_key,
356 registry_timeout_key,
357 child_scopes_timeout_key,
358 registry_endpoint_dir_key,
359@@ -143,11 +135,6 @@
360 return locate_timeout_;
361 }
362
363-int ZmqConfig::debug_locate_timeout() const
364-{
365- return debug_locate_timeout_;
366-}
367-
368 int ZmqConfig::registry_timeout() const
369 {
370 return registry_timeout_;
371
372=== modified file 'src/scopes/internal/zmq_middleware/ZmqMiddleware.cpp'
373--- src/scopes/internal/zmq_middleware/ZmqMiddleware.cpp 2015-06-29 06:11:47 +0000
374+++ src/scopes/internal/zmq_middleware/ZmqMiddleware.cpp 2015-07-01 11:05:00 +0000
375@@ -106,7 +106,6 @@
376
377 twoway_timeout_ = config.twoway_timeout();
378 locate_timeout_ = config.locate_timeout();
379- debug_locate_timeout_ = config.debug_locate_timeout();
380 registry_timeout_ = config.registry_timeout();
381 child_scopes_timeout_ = config.child_scopes_timeout();
382 public_endpoint_dir_ = config.endpoint_dir();
383@@ -811,11 +810,6 @@
384 return locate_timeout_;
385 }
386
387-int64_t ZmqMiddleware::debug_locate_timeout() const noexcept
388-{
389- return debug_locate_timeout_;
390-}
391-
392 int64_t ZmqMiddleware::registry_timeout() const noexcept
393 {
394 return registry_timeout_;
395
396=== modified file 'src/scopes/internal/zmq_middleware/ZmqScope.cpp'
397--- src/scopes/internal/zmq_middleware/ZmqScope.cpp 2015-06-29 06:13:53 +0000
398+++ src/scopes/internal/zmq_middleware/ZmqScope.cpp 2015-07-01 11:05:00 +0000
399@@ -325,8 +325,7 @@
400 capnp::MallocMessageBuilder request_builder;
401 make_request_(request_builder, "debug_mode");
402
403- int64_t timeout = mw_base()->debug_locate_timeout();
404- auto future = mw_base()->twoway_pool()->submit([&] { return this->invoke_twoway_(request_builder, -1, timeout); });
405+ auto future = mw_base()->twoway_pool()->submit([&] { return this->invoke_twoway_(request_builder, -1, 30000); });
406 auto out_params = future.get();
407 auto response = out_params.reader->getRoot<capnproto::Response>();
408 throw_if_runtime_exception(response);
409@@ -346,11 +345,10 @@
410 ZmqObjectProxy::TwowayOutParams ZmqScope::invoke_scope_(capnp::MessageBuilder& in_params, int64_t timeout)
411 {
412 // Check if this scope has requested debug mode, if so, disable two-way timeout and set
413- // locate timeout to debug_locate_timeout.
414+ // locate timeout to 30s.
415 if (debug_mode())
416 {
417- int64_t timeout = mw_base()->debug_locate_timeout();
418- return this->invoke_twoway_(in_params, -1, timeout);
419+ return this->invoke_twoway_(in_params, -1, 30000);
420 }
421 return this->invoke_twoway_(in_params, timeout);
422 }

Subscribers

People subscribed via source and target branches

to all changes: