Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs/namespaces/log.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The journal is intentionally minimal: there's no per-entry timestamp or transact
| [`.log.roll`](#log-roll) | nullary | restricted | Close the active segment and start a new one. |
| [`.log.replay`](#log-replay) | unary | restricted | Replay a journal file; return entry count. |
| [`.log.validate`](#log-validate) | unary | — | Scan a journal file; return `(chunks valid_bytes)`. |
| [`.log.close`](#log-close) | variadic | restricted | Flush and close the active journal. |
| [`.log.close`](#log-close) | nullary | restricted | Flush and close the active journal. |
| [`.log.purge`](#log-purge) | nullary | restricted | Close the active journal and delete all its files. |

## `.log.open` { #log-open }
Expand Down
3 changes: 2 additions & 1 deletion src/ops/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ ray_t* ray_log_sync_fn(ray_t** args, int64_t n) {
}

ray_t* ray_log_close_fn(ray_t** args, int64_t n) {
(void)args; (void)n;
(void)args;
if (n != 0) return ray_error("arity", ".log.close takes no arguments");
return err_to_ray(ray_journal_close(), "io");
}

Expand Down
1 change: 1 addition & 0 deletions test/rfl/journal/ops_journal_wrappers.rfl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
;; left a journal open would make our .log.open fail with "already open".
;; Close defensively first (no-op + RAY_OK if already closed).
(nil? (.log.close)) -- true
(.log.close 1) !- arity
(.sys.exec "rm -f /tmp/rfl_ops_journal_wrap.log /tmp/rfl_ops_journal_wrap.qdb /tmp/rfl_ops_journal_wrap.qdb.tmp /tmp/rfl_ops_journal_wrap.*.log")

;; ════════════════════════════════════════════════════════════════════════
Expand Down
Loading