# API and build change and fix summaries. Doc correctsions
# and/or changes are not mentioned here; see the commit messages.
+2020 November 4; Version 4.4.3
+ Correct bug introduced with race fix (4.4.0) (RIC-674)
+
2020 November 4; Version 4.4.2
Changes to correct more complaints generated by a code scan. (RIC-673)
Also addressed some sonar coverage issues with unit test changes.
set( major_version "4" ) # should be automatically populated from git tag later, but until CI process sets a tag we use this
set( minor_version "4" )
-set( patch_level "2" )
+set( patch_level "3" )
set( install_root "${CMAKE_INSTALL_PREFIX}" )
set( install_inc "include/rmr" )
version 4.0.0, the RMR versions should no longer skip.
+2020 November 4; Version 4.4.3
+------------------------------
+
+Correct bug introduced with race fix (4.4.0) (RIC-674)
+
+
+
+2020 November 4; Version 4.4.2
+------------------------------
+
+Changes to correct more complaints generated by a code scan.
+(RIC-673) Also addressed some sonar coverage issues with unit
+test changes.
+
+
+
2020 November 4; Version 4.4.1
------------------------------
Changes to correct complaints generated by a code scan.
-(Ric-673)
+(RIC-673)
smsg->len = strlen( smsg->payload ) + 1;
- rmr_vlog( RMR_VL_INFO, "rmr_rtc: sending table state: (%s) state=%d whid=%d\n", smsg->payload, state, ctx->rtg_whid );
+ rmr_vlog( RMR_VL_INFO, "rmr_rtc: sending table state: (%s) state=%d whid=%d table=%s\n", smsg->payload, state, ctx->rtg_whid, table_id );
if( use_rts ) {
smsg = rmr_rts_msg( ctx, smsg );
} else {
if( ctx->new_rtable->updates != atoi( tokens[2] ) ) { // count they added didn't match what we received
rmr_vlog( RMR_VL_ERR, "rmr_rtc: RT update had wrong number of records: received %d expected %s\n",
ctx->new_rtable->updates, tokens[2] );
+ send_rt_ack( pctx, mbuf, ctx->table_id, !RMR_OK, wbuf );
uta_rt_drop( ctx->new_rtable );
ctx->new_rtable = NULL;
break;
rmr_vlog_force( RMR_VL_DEBUG, "updated route table:\n" );
rt_stats( ctx->rtable );
}
+
+ send_rt_ack( pctx, mbuf, ctx->table_id, RMR_OK, NULL );
+ ctx->rtable_ready = 1; // route based sends can now happen
} else {
if( DEBUG > 1 ) rmr_vlog_force( RMR_VL_DEBUG, "end of rt update noticed, but one was not started!\n" );
ctx->new_rtable = NULL;
} else { // start a new table.
if( ctx->new_rtable != NULL ) { // one in progress? this forces it out
if( DEBUG > 1 || (vlevel > 1) ) rmr_vlog_force( RMR_VL_DEBUG, "new table; dropping incomplete table\n" );
+ send_rt_ack( pctx, mbuf, ctx->table_id, !RMR_OK, "table not complete" ); // nack the one that was pending as end never made it
uta_rt_drop( ctx->new_rtable );
ctx->new_rtable = NULL;
}
usleep( 1000 ); // small sleep to yield the processer if that is needed
}
- rmr_sym_clear( rt ); // clear all entries from the old table
+ if( rt->hash != NULL ) {
+ rmr_sym_foreach_class( rt->hash, 0, del_rte, NULL ); // deref and drop if needed
+ rmr_sym_clear( rt->hash ); // clear all entries from the old table
+ }
} else {
rt = NULL;
}
if( PARANOID_CHECKS ) {
if( ctx == NULL ) {
- if( DEBUG ) rmr_vlog( RMR_VL_DEBUG, "epsock_byname: parinoia check pop ctx=%p rt=%p\n", ctx, rt );
+ if( DEBUG ) rmr_vlog( RMR_VL_DEBUG, "epsock_byname: paranoia check pop ctx=%p rt=%p\n", ctx, rt );
return FALSE;
}
- rt = get_rt( ctx ); // get active rt and bump ref count
- if( rt == NULL || (si_ctx = ctx->si_ctx) == NULL ) {
- if( DEBUG ) rmr_vlog( RMR_VL_DEBUG, "epsock_byname: parinoia check pop rt=%p sictx=%p\n", rt, si_ctx );
+ if( (si_ctx = ctx->si_ctx) == NULL ) {
+ if( DEBUG ) rmr_vlog( RMR_VL_DEBUG, "epsock_byname: paranoia check pop sictx is nil\n" );
+ return FALSE;
+ }
+ if( (rt = get_rt( ctx )) == NULL ) { // get active rt and bump ref count
+ if( DEBUG ) rmr_vlog( RMR_VL_DEBUG, "epsock_byname: paranoia check pop no rtable\n" );
return FALSE;
}
} else {
char* seed_fname; // seed file
SOCKET_TYPE nn_sock; // differnt in each transport (nng == struct, SI/Nano == int)
rmr_mbuf_t* mbuf; // message for meid route testing
+ void* p; // generic pointer
#ifndef NNG_UNDER_TEST
si_ctx_t* si_ctx = NULL;
state = uta_epsock_byname( NULL, "localhost:4561", &nn_sock, &ep ); // test coverage on nil checks
#else
state = uta_epsock_byname( NULL, "localhost:4561", &nn_sock, &ep );
+ errors += fail_not_equal( state, 0, "socket (by name) nil context check returned true" );
+
+ p = ctx->si_ctx;
+ ctx->si_ctx = NULL; // set to drive second test
+ state = uta_epsock_byname( ctx, "localhost:4561", &nn_sock, &ep );
+ ctx->si_ctx = p;
#endif
errors += fail_not_equal( state, 0, "socket (by name) nil check returned true" );
"mse | 1 | -1 | localhost:84306\n"
"mse | 10 | -1 | localhost:84306\n"
"mse | 10 | 1 | localhost:84306\n"
- "# short record to drive test\n"
- "del\n"
- "del | 12 | 12\n"
"# this table should be ok\n"
"newrt | start | dummy-seed\n"
"newrt | end | 3\n"
"# for an update to the existing table\n"
-
"# not in progress; drive that exception check\n"
"update | end | 23\n"
"update | start | dummy-seed\n"
- "mse | 2 | 2 | localhost:2222\n"
+ "mse | 3 | 2 | localhost:2222\n"
+ "# short record to drive test\n"
+ "del\n"
"# no table end for exception handling\n"
"update | start | dummy-seed\n"
"mse | 2 | 2 | localhost:2222\n"
- "update | end | 1\n";
+ "del | 10 | 1\n"
+ "update | end | 2\n";
fprintf( stderr, "<INFO> loading RT from edge case static table\n" );
fprintf( stderr, "<INFO> %s\n", rt_stuff );
gen_custom_rt( ctx, rt_stuff );
+ fprintf( stderr, "<INFO> edge case load completed\n" );
errors += fail_if_nil( ctx->rtable, "edge case route table didn't generate a pointer into the context" );
unsetenv( "RMR_SEED_RT" ); // remove for next read try