Skip to content

Commit

Permalink
cyrusdb_skiplist: no xsyslog in 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
elliefm committed Mar 8, 2024
1 parent da0ca3c commit 5737fa6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cassandane/Cassandane/Cyrus/CyrusDB.pm
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ sub test_recover_skipstamp
if ($self->{instance}->{have_syslog_replacement}) {
my $syslog = join "\n", $self->{instance}->getsyslog();
$self->assert_matches(qr/skipstamp is missing/, $syslog);
$self->assert_matches(qr/DBERROR: skipstamp/, $syslog);
$self->assert_matches(qr/skipstamp unreadable/, $syslog);
}

# shut down, enable recover, and restart
Expand All @@ -323,7 +323,7 @@ sub test_recover_skipstamp

# cyrus processes should not whinge about missing skipstamp file
$self->assert_does_not_match(qr/skipstamp is missing/, $syslog);
$self->assert_does_not_match(qr/DBERROR: skipstamp/, $syslog);
$self->assert_does_not_match(qr/skipstamp unreadable/, $syslog);
}
}

Expand Down
8 changes: 4 additions & 4 deletions lib/cyrusdb_skiplist.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,15 +272,15 @@ static int myinit(const char *dbdir, int myflags)
r = fd = open(sfile, O_RDONLY, 0644);
if (r == -1 && errno == ENOENT) {
/* tell the admin what they need to do! */
xsyslog(LOG_INFO, "skipstamp is missing, have you run `ctl_cyrusdb -r`?",
"filename=<%s>", sfile);
syslog(LOG_INFO, "%s is missing, have you run `ctl_cyrusdb -r`?",
sfile);
}

if (r != -1) r = retry_read(fd, &net32_time, 4);

if (r == -1) {
xsyslog(LOG_ERR, "DBERROR: skipstamp unreadable, assuming the worst",
"filename=<%s>", sfile);
syslog(LOG_ERR, "DBERROR: %s unreadable, assuming the worst",
sfile);
/* "assuming the worst" means recovery will run for every skiplist
* database every time it's opened, because we can't determine that
* it doesn't need it.
Expand Down

0 comments on commit 5737fa6

Please sign in to comment.