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
6 changes: 6 additions & 0 deletions pages/database-management/logs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ RESET SESSION SETTING "log.min_duration_ms";
`SET SESSION SETTING` accepts only the three keys above; any other key raises
`Setting "<key>" cannot be set per-session`.

A session value lasts for the client connection. A failed query or a rollback
keeps it, including the Bolt `RESET` a driver sends after a failure. Switching
to another user on the same connection (the driver re-authenticates, sending
`LOGOFF` and `LOGON`) clears it, and the global value applies again. The new
user can set their own.

## Access logs

If you installed Memgraph with Linux, logs can be found in the
Expand Down
4 changes: 4 additions & 0 deletions pages/database-management/monitoring.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,10 @@ The command returns the unique UUID of the session being traced:
Use this UUID to find the session's events in the log. From this point on, every query executed in the session emits
tagged trace events until tracing is turned off.

Tracing lasts for the client connection. A failed query or a rollback keeps it on, including the Bolt `RESET` a driver
sends after a failure. Switching to another user on the same connection (the driver re-authenticates, sending `LOGOFF`
and `LOGON`) turns it off. The new user can turn it on again and gets the same session UUID.

#### Reading the trace

Each trace event is a line in the main log prefixed with the session tag, the user (when authenticated) and the current
Expand Down
2 changes: 2 additions & 0 deletions pages/database-management/multi-tenancy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,8 @@ with driver.session(database="db2") as session:
session.run("USE DATABASE db1") # Error: database switching disabled
```

The database selected with `USE DATABASE` stays selected for the client connection. A failed query or a rollback keeps it, including the Bolt `RESET` a driver sends after a failure. Switching to another user on the same connection (the driver re-authenticates, sending `LOGOFF` and `LOGON`) clears it. Queries then run on the database the new session requests, or on the new user's [main database](#users-main-database).

### Audit Logs

Audit logs now encompass the active database name, positioned immediately after
Expand Down
4 changes: 4 additions & 0 deletions pages/fundamentals/transactions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,10 @@ SET <scope> TRANSACTION ISOLATION LEVEL <isolation_level>
- SESSION - apply the new isolation level only for the current session
- NEXT - apply the new isolation level only for the next transaction in the current session

A SESSION setting lasts for the client connection. A failed query or a rollback keeps it, including the Bolt `RESET` a driver sends after a failure.
Switching to another user on the same connection (the driver re-authenticates, sending `LOGOFF` and `LOGON`) clears both a SESSION setting and a pending NEXT one.
The new user's transactions then run at the database's current isolation level.

`<isolation_level>` defines the isolation level:
- SNAPSHOT ISOLATION
- READ COMMITTED
Expand Down
Loading