Client workspace types
Performance might benefit from the use of client workspaces of type readonly
, partitioned
, or partitioned-jnl
.
When to use which type
The Type
of a client workspace cannot be changed, with the exception that a readonly
client workspace can be changed to partitioned
.
-
By default, clients are created with the type
writeable
, and theType
field is not shown in the spec. -
The Helix Core Server uses a central
db.have
table to track the have list The list of file revisions currently in the client workspace. forwriteable
clients. However, when many clients syncing a large number of files at the same time, the central table is subject to contention. -
Other client types can reduce this contention because, for them, Helix Core Server uses independent
db.have
tables, each of which pertains only to one client instance. -
To enable this feature, an administrator uses the
client.readonly.dir
configurable to set the location on the server for the independentdb.have
tables.
Type | Independent db.have? | Journaled, checkpointed, and recoverable? | Use Case |
writeable
|
No | Yes |
For general use. |
partitioned-jnl
|
Yes | Yes | For general use in situations where client workspaces might otherwise experience contention for the server's central db.have table. |
readonly
|
Yes | No | For short lived clients used in build automation scripts that do not edit or submit files. |
partitioned
|
Yes | No |
For short lived clients used in build automation scripts that do edit or submit files. |
graph
|
No | Yes | For use with depots and repos of type graph and Git Connector. To learn more, see Work with Git. |
The types that are journaled, checkpointed, and recoverable also support Replication, except that between commit and edge servers, only the client spec is replicated. To learn more, see Setting global client views in Client workspaces and client views.
Limitations and capabilities
Clients of type readonly
, partitioned
, and partitioned-jnl
are allowed to be unloaded and reloaded. The deletion entries and notes are journaled for partitioned-jnl
but not for readonly
or partitioned
.
The p4 journaldbchecksums
command works for partitioned-jnl
but not for readonly
or partitioned
because this command updates journal entries.
readonly
, partitioned
, and partitioned-jnl
support the p4d -xx
, p4 dbverify
, and p4d -xv
commands, which read, but do not update, the tables.
You can also minimize contention to a central have list The list of file revisions currently in the client workspace. by using the Commit-edge architecture because each Edge Server has its own db.have
table that is separate from the Commit Server's central db.have
table.
Typical commands and readonly, partitioned, and partitioned-jnl clients
readonly | partitioned | partitioned-jnl |
---|---|---|
For build automation, where editing and submitting files is not required, consider |
Use |
A
|
Creating a readonly, partitioned, or partitioned-jnl client workspace
Before creating a client workspace of type readonly
, partitioned
, or partitioned-jnl
, configure the storage location for the local db.have
table by setting the client.readonly.dir
server configurable. For example:
p4 configure set client.readonly.dir=part-db-have
Although the name of this configurable contains "readonly", its setting applies to the readonly
, partitioned
, and partitioned-jnl
types.
Relative paths specified in client.readonly.dir
are relative to P4ROOT, but absolute paths can also be specified. The client.readonly.dir server configurable does not require a server restart. Helix Core Server creates the directory upon first usage if it doesn't already exist.
To create a client workspace that is readonly
, partitioned
, or partitioned-jnl
, set the Type
field in the client specification to readonly
, partitioned
, or partitioned-jnl
.
For example,
p4 client my-readonly-client ... Type: readonly
or
p4 client my-partitioned-client ... Type: partitioned
or
p4 client my-partitioned-jnl-client ... Type: partitioned-jnl
Commands for partitioned have tables
The p4d -jd
command also works with partitioned db.have
tables. See Journal dump and restore filtering.