This provides more documentation for Online Schema Change (OSC) beyond part 1.
API
This is an extract from the source code:
The OnlineSchemaChange class encapsulates all the steps needed to do online schema changes. The public functions are:
- __construct - describe in the Constuctor section
- forceCleanup - calls execute() method with OSC_FLAGS_FORCE_CLEANUP flag set.
- getOscLock,releaseOscLock, isOscLockHeld - to be used from other scripts (such as backup related scripts) that want to see if OSC lock is held or to get OSC lock to prevent OSC from running.
- getCleanupTables(), serverCleanup() - to be used on a db restored from a backup to check if there are OSC …