Skip to content
Snippets Groups Projects

Fixed signing fail when journal gets full

Merged Ghost User requested to merge full-journal-fix into master

Merge request reports

Merged by avatar (Apr 18, 2025 8:06am UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
313 313 return knot_changeset_is_empty(HEAD(chs->sets));
314 314 }
315 315
316 static int zones_store_changesets_begin_and_store(knot_zone_t *zone,
317 knot_changesets_t *chgsets,
318 journal_t **transaction)
316 static int zones_store_chgsets_try_store(knot_zone_t *zone,
317 knot_changesets_t *chgsets,
318 journal_t **transaction)
319 319 {
320 assert(zone != NULL);
  • Jan Včelák
    Jan Včelák @jvcelak started a thread on commit 98d12117
  • 394 journal_t **transaction)
    395 {
    396 assert(zone != NULL);
    397 assert(chgsets != NULL);
    398
    399 if (zones_changesets_empty(chgsets)) {
    400 return KNOT_EINVAL;
    401 }
    402
    403 int ret = zones_store_chgsets_try_store(zone, chgsets, transaction);
    404
    405 /* If the journal was full (KNOT_EBUSY), we must flush it by hand and
    406 * try to save the changesets once again. If this fails, the changesets
    407 * are larger than max journal size, so return error.
    408 */
    409 if (ret == KNOT_EBUSY) {
  • Jan Včelák
    Jan Včelák @jvcelak started a thread on commit 98d12117
  • 2262 2300 log_server_notice("Journal for '%s' is full, flushing.\n",
    2263 2301 zd->conf->name);
    2264 2302 evsched_cancel(tmr->parent, tmr);
    2265 evsched_schedule(tmr->parent, tmr, 0);
    • This introduces a magic. :thumbsdown:

      Zone flushing should be performed altogether in this function or by the caller. Logging the message a cancelling the event at one place, and invoking the flush at the other place is IMO confusing.

    • Author Contributor

      The event cancelling is not in the final version, but I will move the message as well, there you're right.

  • Ohterwise OK. +1

  • Author Contributor

    Double-check now, please.

  • Please register or sign in to reply
    Loading