#include <stdio.h> void LongUsage() { printf( "p4jrep replicates a live journal from one server into\n" ); printf( "another.\n" ); printf( "\n" ); printf( "Usage: p4jrep [options] command\n" ); printf( "\n" ); printf( "where options are:\n" ); printf( "\n" ); printf( " -J journal Live journal replicated from one server\n" ); printf( " into another. The default file name is\n" ); printf( " \"journal\".\n" ); printf( "\n" ); printf( " -j prefix Prefix used when rotating the journal with\n" ); printf( " p4d -jc, p4d -jj, p4 admin checkpoint, or\n" ); printf( " p4 admin journal. By default, no prefix\n" ); printf( " is used.\n" ); printf( "\n" ); printf( " -i instance Instance identifier for this replication.\n" ); printf( " Use an instance identifier for multiple\n" ); printf( " replications from the same live journal.\n" ); printf( " By default, no instance identifier is\n" ); printf( " used.\n" ); printf( "\n" ); printf( " -L logfile Log file to capture p4jrep messages,\n" ); printf( " including stdout and stderr of the command\n" ); printf( " executed by p4jrep. By default, messages\n" ); printf( " from p4jrep and the command executed by\n" ); printf( " p4jrep are sent to stdout or stderr.\n" ); printf( "\n" ); printf( " -d delay Delay (in seconds) between checks for new\n" ); printf( " entries in the live journal. By default,\n" ); printf( " the live journal is checked every second.\n" ); printf( "\n" ); printf( " -t delay Delay (in milliseconds) to ensure\n" ); printf( " transactional atomicity. If no additional\n" ); printf( " journal entries are written during this\n" ); printf( " delay, the transaction is assumed\n" ); printf( " complete. By default, this delay\n" ); printf( " is ten milliseconds.\n" ); printf( "\n" ); printf( " -a Do not append the \"-\" character\n" ); printf( " (denoting STDIN) to the command executed\n" ); printf( " by p4jrep. Use this option if the command\n" ); printf( " cannot use the \"-\" character, or if it\n" ); printf( " is appended by a downstream filter. By\n" ); printf( " default, the \"-\" character is appended\n" ); printf( " to the command executed by p4jrep.\n" ); printf( "\n" ); printf( " -k Keep the pipe open from p4jrep to the\n" ); printf( " command executed by p4jrep. This option\n" ); printf( " should only be used when there is a\n" ); printf( " downstream filter that can close the\n" ); printf( " pipe to the replicating p4d -jr. If the\n" ); printf( " pipe is not closed, the target server will\n" ); printf( " be locked by the replicating p4d -jr. By\n" ); printf( " default, the pipe is closed (and later\n" ); printf( " reopened) when there are no journal\n" ); printf( " entries to be replicated.\n" ); printf( "\n" ); printf( "and command is executed to replay journal fragments\n" ); printf( "into the target server.\n" ); printf( "\n" ); }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 5119 | Michael Shields |
Added -t delay in an attempt to ensure transactional atomicity. If no additional journal entries are written during this delay, the transaction is assumed complete, which closes the pipe, which terminates the command (which if includes a p4d -jr, releases the locks in the target server, allowing commands access to the replicated atomic transaction). By default, this delay is ten milliseconds. Locking the journal does not ensure transactional atomicity since the server locks the journal once for each journal entry written, not once per transaction. And we would like to avoid locking the journal since that would introduce a potential concurrency problem. Not all operations in the server are atomic transactions and therefore cannot be replicated atomically. For example, updating a client's have list as files are being synced is not an atomic transaction. But committing a submit is an atomic transaction, and this change (with perhaps some site-specific tuning of the -t delay) attempts to replicate the commit atomically. |
||
#2 | 5012 | Michael Shields |
Added [-d <delay>] option to delay (in seconds) between checks for new entries in the live journal. By default, the delay between checks is one second. |
||
#1 | 4839 | Michael Shields | Pushing p4jrep source into the public depot. |