mirror of
https://github.com/schoebel/mars
synced 2024-12-26 08:32:24 +00:00
light: show logfile name in versionlink
This commit is contained in:
parent
4dbedabd78
commit
e88e857ee9
@ -705,7 +705,7 @@ int _update_version_link(struct mars_rotate *rot, struct trans_logger_info *inf)
|
||||
*tmp = '\0';
|
||||
}
|
||||
|
||||
len += sprintf(old + len, ",%s,%lld,%d;%s", inf->inf_host, inf->inf_log_pos, inf->inf_sequence, prev_digest ? prev_digest : "");
|
||||
len += sprintf(old + len, ",log-%09d-%s,%lld;%s", inf->inf_sequence, inf->inf_host, inf->inf_log_pos, prev_digest ? prev_digest : "");
|
||||
|
||||
new = path_make("%s/version-%09d-%s", rot->parent_path, inf->inf_sequence, my_id());
|
||||
if (!new) {
|
||||
|
@ -278,7 +278,7 @@ sub check_splitbrain {
|
||||
|
||||
my $version = readlink($link) or ldie "cannot read symlink '$link'\n";
|
||||
my $otherhost = $version;
|
||||
$otherhost =~ s:^[^,]*,([^,]*),.*$:$1:;
|
||||
$otherhost =~ s:^[^,]*?,log-[0-9]*?-([^,]*?),.*$:$1:;
|
||||
my $otherlink = sprintf("$mars/resource-$res/version-%09d-$otherhost", $nr);
|
||||
my $otherversion = readlink($otherlink) or ldie "cannot read symlink '$otherlink'\n";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user