@@ -49,8 +49,6 @@ static int opt_initial;
49
49
static int opt_no_start;
50
50
static unsigned opt_allocated_nodeid;
51
51
static int opt_angel_pid;
52
- static int opt_retries;
53
- static int opt_delay;
54
52
static unsigned long opt_logbuffer_size;
55
53
56
54
extern NdbNodeBitmask g_nowait_nodes;
@@ -109,13 +107,11 @@ static struct my_option my_long_options[] =
109
107
(uchar**) &opt_angel_pid, (uchar **) &opt_angel_pid, 0 ,
110
108
GET_UINT, REQUIRED_ARG, 0 , 0 , UINT_MAX, 0 , 0 , 0 },
111
109
{ " connect-retries" , ' r' ,
112
- " Number of times mgmd is contacted at start. -1: eternal retries" ,
113
- (uchar**) &opt_retries, (uchar**) &opt_retries, 0 ,
110
+ " Number of times mgmd is contacted at start. -1: eternal retries"
111
+ " NOTE: -r will be removed with the next release!"
112
+ " Use --connect-retries instead" ,
113
+ (uchar**) &opt_connect_retries, (uchar**) &opt_connect_retries, 0 ,
114
114
GET_INT, REQUIRED_ARG, 12 , -1 , 65535 , 0 , 0 , 0 },
115
- { " connect-delay" , NDB_OPT_NOSHORT,
116
- " Number of seconds between each connection attempt" ,
117
- (uchar**) &opt_delay, (uchar**) &opt_delay, 0 ,
118
- GET_INT, REQUIRED_ARG, 5 , 0 , 3600 , 0 , 0 , 0 },
119
115
{ " logbuffer-size" , NDB_OPT_NOSHORT,
120
116
" Size of the log buffer for data node ndb_x_out.log" ,
121
117
(uchar**) &opt_logbuffer_size, (uchar**) &opt_logbuffer_size, 0 ,
@@ -137,6 +133,15 @@ static void short_usage_sub(void)
137
133
ndb_service_print_options (" ndbd" );
138
134
}
139
135
136
+ static bool get_one_option (int optid, const struct my_option *opt,
137
+ char *argument) {
138
+ if (optid == ' r' )
139
+ g_eventLogger->warning (
140
+ " NOTE: -r option will be removed in the next release!"
141
+ " Use --connect-retries instead." );
142
+ return ndb_std_get_one_option (optid, opt, argument);
143
+ }
144
+
140
145
/* *
141
146
* C++ Standard 3.6.1/3:
142
147
* The function main shall not be used (3.2) within a program.
@@ -180,7 +185,7 @@ real_main(int argc, char** argv)
180
185
}
181
186
182
187
int ho_error;
183
- if ((ho_error=opts.handle_options ()))
188
+ if ((ho_error=opts.handle_options (get_one_option )))
184
189
exit (ho_error);
185
190
186
191
if (opt_no_daemon || opt_foreground) {
@@ -225,7 +230,7 @@ real_main(int argc, char** argv)
225
230
ndbd_run (opt_foreground, opt_report_fd,
226
231
opt_ndb_connectstring, opt_ndb_nodeid, opt_bind_address,
227
232
opt_no_start, opt_initial, opt_initialstart,
228
- opt_allocated_nodeid, opt_retries, opt_delay ,
233
+ opt_allocated_nodeid, opt_connect_retries, opt_connect_retry_delay ,
229
234
opt_logbuffer_size);
230
235
}
231
236
@@ -244,8 +249,8 @@ real_main(int argc, char** argv)
244
249
opt_initial,
245
250
opt_no_start,
246
251
opt_daemon,
247
- opt_retries ,
248
- opt_delay );
252
+ opt_connect_retries ,
253
+ opt_connect_retry_delay );
249
254
250
255
return 1 ; // Never reached
251
256
}
0 commit comments