Client workspaces and client views

Binding workspaces to the edge server

Bind client workspaces to the edge server.

Because this server is configured to offer the edge server service, it maintains its own local copy of the list of client workspaces (db.view) and their respective have lists (db.have).

On the edge server, create a client workspace with p4 client:

$ p4 -c edge0001 -p edge:1667 client edge0001

When creating a new workspace on the edge server, you must ensure that your current client workspace has a ServerID that matches that required by edge:1667. Because workspace edge0001 does not yet exist, you must manually specify edge0001 as the current client workspace with the -c clientname option and simultaneously supply edge0001 as the argument to the p4 client command.

When the p4 client form appears, set the ServerID: field to edge-1667 and note that if it is not set manually, it will be set automatically when the form is saved.

Setting global client views

The server.global.client.views configurable determines whether the view maps of a non-stream client on an edge server are made global when the client is modified. This configurable can be set globally or individually for each server, thus allowing client maps to be global on most edge servers while keeping them local on those edge servers that don’t need or want them to be global.

The value of server.global.client.views on an edge server determines whether it forwards view maps to a commit server.

You should make client view maps on a replica global if up-to-date information is needed by another server running a command that needs a client view map; for example, if that client is to be used as a template on another server.

  • If server.global.client.views=1 on an edge server, then when a client is modified on that edge server, its view map is made global.
  • The default value of 0 on the edge server means that client view maps on that edge server are not made global when a client is modified.

Setting this configurable does not immediately make client view maps global; that happens only when a client is modified afterwards. Clearing this configurable does not delete the view maps of any clients, but it does prevent subsequent changes to a client’s view map from being propagated to other servers. If a client with global view maps is deleted, its view maps are also deleted globally regardless of the value of server.global.client.views; this is to prevent orphaned view maps.

In summary, view maps of a client are made global only under these conditions:

  • The client is bound to an edge server.
  • The edge server has server.global.client.views=1.
  • The client is a non-stream client.
  • The client is modified.

    If you are working with an existing client, you can "modify" it by adding a few words to the description. For example, you can add a statement that this client’s view maps are now global.

Note

Clients bound directly to a commit server have their view maps replicated everywhere independently of the setting of server.global.client.views.

For complicated reasons, it is best to choose one setting for this configurable, and not change it.