Skip to main content

Module rename

Module rename 

Source
Expand description

ClientFrame::Rename (synaps daemon rename <ID|NAME> <NEW_NAME> | --clear [--force]): name or unname one session from a control connection, without attaching.

Renaming is metadata, not input: it needs no input ownership, and the connection never attaches, so presence (clients, owner, the shared-inbox claim) does not change. The daemon sends the session the host-only engine command rename (JSON args: name + the compare-and-set expect), handled by SessionActor::host_rename: /saveas’s rules under a process-wide name lock, a durable save that keeps the file mtimes, and a Conversation to every attached client. A parked session is renamed on disk under its journal lock (session_catalog::rename_past_session) without being woken; it picks the name up from disk when it unparks.

Constants§

RENAME_REPLY_BUDGET
How long the actor may take to answer: queue latency plus one durable save (a parked session’s save folds its journal, which can be large).
RENAME_SEND_RETRY
How long a full command queue is retried before giving up.

Functions§

rename_session
Serve Rename{session_id, name, expect}. None or blank clears the name. Always answers with one frame: Renamed, RenameFailed, or Refused{UnknownSession}.