WorkspaceDataSnapshot
The WorkspaceDataSnapshot
table has identical columns to WorkspaceData
but contains periodically captured snapshots representing only the most recent active entries. This is used internally to improve the startup performance of web user interface sessions. It is updated by an optional Persistent Query called WorkspaceSnapshot
; by default this runs every night. If WorkspaceDataSnapshot
is not present or is empty, the web server will still function but may take longer to start user sessions.
For administrative details, see Creating Workspace Data Snapshots.
Caution
If you're deleting old WorkspaceDataSnapshot
data, it is important to keep at least the most recent partition at all times. This data is written to historical partitions instead of intraday so it's not important to delete it, and merging is not required.
Columns
Column Name | Column Type | Description |
---|---|---|
Date | String | The date on which the row was generated (as defined by the LastModifiedTime column value). This is the partitioning column. |
Owner | String | The entry's owner. |
Name | String | The entry's name. |
Id | String | A system-assigned identifier that uniquely identifies this entry. |
Version | int | The version of this entry. |
DataType | String | The system-assigned data type for the saved data such as Dashboard or Workspace . |
Data | String | The saved data. |
Status | String | The status, which indicates whether the entry is active or deleted. |
AdminGroups | String[] | The groups which are allowed to administer this entry. |
ViewerGroups | String[] | The groups which are allowed to view this entry. |
LastModifiedByAuthenticated | String | The authenticated user (e.g., the user who logged in via password, SAML, etc.) who created this row. |
LastModifiedByEffective | String | The effective user (e.g., the "operate as" user if the authenticated user is using the "operate as" option) who created this row. |
LastModifiedTime | DateTime | The date and time when this row was created. |
Creating Workspace Data Snapshots
Deephaven's web console relies on the WorkspaceData
table within the DbInternal
namespace for persistent state storage. This table incrementally grows with each user workspace update and is re-scanned whenever the WebClientData
query restarts. Over time, this cumulative growth and re-scanning can consume significant resources. To mitigate this, Deephaven provides a snapshot facility specifically for this table.
Snapshots should be created periodically. The system is designed for daily execution and creates a new snapshot only if there are sufficient changes or enough time has elapsed since the last one. By default, the WorkspaceSnapshot
Persistent Query (PQ) runs daily and attempts to create a new snapshot if conditions warrant. Alternatively, the following console command, executed in a merge server session, also triggers a snapshot attempt. The updateSnapshot()
function returns true
if a new snapshot is created, and false
otherwise.
wws = new com.illumon.iris.utils.WriteableWorkspaceSnapshot(log,db)
wws.updateSnapshot()
The internal logic steps are logged to the ProcessEventLog with LogEntry strings beginning with loadLatestSnapshot
and updateSnapshot
.
The following configuration parameters control the frequency of snapshot recording. A new snapshot is recorded if either of the criteria are met.
Property | Description | Default Value |
---|---|---|
WorkspaceDataSnapshot.daysSinceLastSnapshotThreshold | Days since the last snapshot was created | 7 |
WorkspaceDataSnapshot.changesToSnapshotSizeRatioThreshold | Ratio of changed rows since the last snapshot | 0.2 (20% new) |
Related documentation
- Internal tables overview
AuditEventLog
PersistentQueryConfigurationLog
PersistentQueryStateLog
ProcessEventLogIndex
ProcessEventLog
ProcessInfo
ProcessMetrics
QueryOperationPerformanceLogCoreV2Index
QueryOperationPerformanceLogCoreV2
QueryPerformanceLogCoreV2
QueryUserAssignmentLog
ResourceUtilization
ServerStateLogIndex
ServerStateLog
UpdatePerformanceLogCoreV2Index
UpdatePerformanceLogCoreV2
WorkspaceData