Liveliness local readers
This commit adds support for liveliness QoS when using local readers. The implementation for (liveliness) expiration of writers used here is similar to that used with proxy writers, and it also supports the three liveliness kinds (1) automatic, which is trivial when using a local reader and writer, (2) manual-by-participant and (3) manual-by-topic. In addition, these changes and fixes are included in this commit: - Fixed a bug in heartbeat handling in the reader: for manual-by- participant writers the lease was not updated on reception of a heartbeat message with liveliness flag set. This is fixed and a test-case is added. - Include the liveliness flag in a heartbeat message to the trace - Trace all lease renewals, including liveliness leases - Replaced liveliness changed state 'twitch' by 2 subsequent calls to the status callback - Added a test for liveliness duration 0 and 1ns (for both local and remote readers) Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
This commit is contained in:
parent
bb76798492
commit
9410753076
9 changed files with 610 additions and 203 deletions
|
@ -36,6 +36,7 @@ for (@showopts) {
|
|||
my $topfmt = "%${topcolwidth}.${topcolwidth}s";
|
||||
my $guidre = "[0-9a-f]+(?::[0-9a-f]+){3}";
|
||||
my $gidre = "[0-9a-f]+(?::[0-9a-f]+){2}";
|
||||
my $leasere = "(?:L\\((?:[a-z]+ )?[0-9a-f:]+\\s+[0-9.]+\\)\\s*)+";
|
||||
my %opstr = ("00" => "R ", "01" => "W ", # index by $stinfo.$dflag
|
||||
"10" => " D ", "11" => "WD ",
|
||||
"20" => " U", "21" => "W U",
|
||||
|
@ -258,7 +259,7 @@ while(<>) {
|
|||
# decent proxy for that.
|
||||
#
|
||||
# FIXME: find a way of dealing with decimal representation ...
|
||||
if (/: ACKNACK\(F?#\d+:(\d+)\/(\d+):[01]* (?:L\([0-9a-f:]+\s+[0-9.]+\)\s*)?([0-9a-f]+(?::[0-9a-f]+){2}:[234]c7) -\> ([0-9a-f]+(?::[0-9a-f]+){2}:[234]c2) .*?(happy-now)?/) {
|
||||
if (/: ACKNACK\(F?#\d+:(\d+)\/(\d+):[01]* (?:$leasere)?([0-9a-f]+(?::[0-9a-f]+){2}:[234]c7) -\> ([0-9a-f]+(?::[0-9a-f]+){2}:[234]c2) .*?(happy-now)?/) {
|
||||
if (defined $5 || ($1 > 1 && $2 == 0 && version_at_least(6,6,4))) {
|
||||
# happy-now should be enough, but historically DDSI2 advertised only data present in the WHC,
|
||||
# which caused happy-now to not show up if the historical data ended on an unregister, because
|
||||
|
@ -266,7 +267,7 @@ while(<>) {
|
|||
# last one written (that is, unregistered) (fixed in 6.6.4)
|
||||
check_disccomplete("A", $3);
|
||||
}
|
||||
} elsif (/: HEARTBEAT\(F?#\d+:(\d+)\.\.(\d+)\s+(?:L\([0-9a-f:]+\s+[0-9.]+\)\s*)?([0-9a-f]+(?::[0-9a-f]+){2}:[234]c2)/) {
|
||||
} elsif (/: HEARTBEAT\(F?L?#\d+:(\d+)\.\.(\d+)\s+(?:$leasere)?([0-9a-f]+(?::[0-9a-f]+){2}:[234]c2)/) {
|
||||
check_disccomplete("H", $3);
|
||||
# if there is no data and final is set there might be no ACK
|
||||
check_disccomplete("B", $3) if $2 < $1;
|
||||
|
@ -745,7 +746,7 @@ while(<>) {
|
|||
if $nlost > 0 && $shows{rematch};
|
||||
delete $prd->{matches}->{$wrguid}->{seqp1del};
|
||||
}
|
||||
} elsif (/ACKNACK\(F?#\d+:(\d+)\/\d+:([01]*) (?:L\(:1c1 [0-9.]+\) )?($guidre) -> ($guidre)(\??)/o) {
|
||||
} elsif (/ACKNACK\(F?#\d+:(\d+)\/\d+:([01]*) (?:$leasere)?($guidre) -> ($guidre)(\??)/o) {
|
||||
my $seqp1 = $1; my $nackset = $2; my $prdguid = hexify($3); my $wrguid = hexify($4); my $wrknown = ($5 eq "");
|
||||
my $wr = $wr{$wrguid};
|
||||
my $cnt = ($nackset =~ y/1//);
|
||||
|
@ -904,7 +905,7 @@ while(<>) {
|
|||
}
|
||||
}
|
||||
}
|
||||
} elsif (/HEARTBEAT\(F?#\d+:(\d+)\.\.(\d+) ($guidre)/o) {
|
||||
} elsif (/HEARTBEAT\(F?L?#\d+:(\d+)\.\.(\d+) ($guidre)/o) {
|
||||
my $prdguid = hexify($3);
|
||||
(my $ppguid = $prdguid) =~ s/:[0-9a-f]+$/:1c1/;
|
||||
$proxypp{$ppguid}->{non_spdp_seen} = 1 if exists $proxypp{$ppguid} && !defined $proxypp{$ppguid}->{tdel};
|
||||
|
@ -1475,7 +1476,7 @@ not necessarily the 4th field in, say, AWK):
|
|||
EOT
|
||||
;
|
||||
exit 1;
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
sub fmtblurb {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue