From 92db4b72ff4cc1c848d85aa06d2aac8ad244953c Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 11:57:37 +0000 Subject: [PATCH] docs(store): clarify shared journal flow Co-Authored-By: Virgil --- journal.go | 2 ++ workspace.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/journal.go b/journal.go index 4c0d404..86d8371 100644 --- a/journal.go +++ b/journal.go @@ -45,6 +45,8 @@ type journalExecutor interface { } // Usage example: `result := storeInstance.CommitToJournal("scroll-session", map[string]any{"like": 4}, map[string]string{"workspace": "scroll-session"})` +// Workspace.Commit uses this same journal write path before it updates the +// summary row in `workspace:NAME`. func (storeInstance *Store) CommitToJournal(measurement string, fields map[string]any, tags map[string]string) core.Result { if err := storeInstance.ensureReady("store.CommitToJournal"); err != nil { return core.Result{Value: err, OK: false} diff --git a/workspace.go b/workspace.go index 5f2e7c8..a29ab1b 100644 --- a/workspace.go +++ b/workspace.go @@ -287,8 +287,8 @@ func (workspace *Workspace) Aggregate() map[string]any { return fields } -// Commit writes one journal row for the workspace and upserts the summary row -// in `workspace:NAME`. +// Commit writes one journal row for the workspace through the shared journal +// writer and upserts the summary row in `workspace:NAME`. // // Usage example: `result := workspace.Commit(); if !result.OK { return }; fmt.Println(result.Value)` func (workspace *Workspace) Commit() core.Result {