Documentation
¶
Index ¶
- Constants
- Variables
- func IndexUpdateTaskExecutorFactory(cnUUID string, txnEngine engine.Engine, cnTxnClient client.TxnClient, ...) func(ctx context.Context, task task.Task) (err error)
- func IndexUpdateTaskMetadata(id task.TaskCode, args ...string) task.TaskMetadata
- func RegisterUpdate(ctx context.Context, cnUUID string, txn client.TxnOperator, tableId uint64, ...) (err error)
- func RenameSrcTable(ctx context.Context, cnUUID string, txn client.TxnOperator, ...) (err error)
- func UnregisterUpdate(ctx context.Context, cnUUID string, txn client.TxnOperator, tableId uint64, ...) (err error)
- func UnregisterUpdateByDbName(ctx context.Context, cnUUID string, txn client.TxnOperator, dbName string) (err error)
- func UnregisterUpdateByTableId(ctx context.Context, cnUUID string, txn client.TxnOperator, tableId uint64) (err error)
- type IndexUpdateStatus
- type IndexUpdateTaskExecutor
- type IndexUpdateTaskInfo
Constants ¶
const ( Action_Ivfflat_Reindex = "ivfflat_reindex" Action_Wildcard = "*" Status_Error = "error" Status_Ok = "ok" Status_Skipped = "skipped" OneWeek = 24 * 7 * time.Hour Reason_Skipped = "skipped" )
+----------------+---------------------+------+------+---------+-------+---------+ | Field | Type | Null | Key | Default | Extra | Comment | +----------------+---------------------+------+------+---------+-------+---------+ | account_id | INT UNSIGNED(32) | NO | PRI | NULL | | | | table_id | BIGINT UNSIGNED(64) | NO | PRI | NULL | | | | db_name | VARCHAR(65535) | NO | PRI | NULL | | | | table_name | VARCHAR(65535) | NO | PRI | NULL | | | | index_name | VARCHAR(65535) | NO | PRI | NULL | | | | action | VARCHAR(65535) | NO | PRI | NULL | | | | metadata | JSON(0) | NO | | NULL | | | | status | JSON(0) | NO | | NULL | | | | create_at | TIMESTAMP(0) | NO | | NULL | | | | last_update_at | TIMESTAMP(0) | YES | | NULL | | | +----------------+---------------------+------+------+---------+-------+---------+
const ParamSeparator = " "
Variables ¶
var IndexUpdateTaskCronExpr = "0 0 * * * *" // run once an hour, beginning of hour
Functions ¶
func IndexUpdateTaskMetadata ¶
func IndexUpdateTaskMetadata(id task.TaskCode, args ...string) task.TaskMetadata
func RegisterUpdate ¶
func RegisterUpdate(ctx context.Context, cnUUID string, txn client.TxnOperator, tableId uint64, dbname string, tablename string, indexname string, action string, metadata string, ) (err error)
always replace with the new data
func RenameSrcTable ¶
func UnregisterUpdate ¶
func UnregisterUpdate(ctx context.Context, cnUUID string, txn client.TxnOperator, tableId uint64, indexname string, action string, ) (err error)
if action == "*", remove all actions
Types ¶
type IndexUpdateStatus ¶
type IndexUpdateTaskExecutor ¶
type IndexUpdateTaskExecutor struct {
// contains filtered or unexported fields
}