light: show logfile name in versionlink

This commit is contained in:
Thomas Schoebel-Theuer 2013-01-11 17:21:23 +01:00
parent 4dbedabd78
commit e88e857ee9
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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";