Skip to content

Only scopedb for write and read on a single workspace

when to use this runbook

The double write and double query applies to the whole cluster

Sometimes we are requested to make a single workspace read and write to just scopedb, which is what this runbook is about

prerequisite

Find the workspace_id (the format is wksp_xxxxxxxxxxxxxxxxxx) that you want to enable only scopedb. fill it in here

sql command

sql
UPDATE main_workspace SET datastore = CAST(REPLACE(CAST(datastore AS CHAR), 'doris', 'scopedb') AS JSON)
where uuid = '<workspace_id>';
update  main_workspace set esInstanceUUID = "scopdedb_12dsad3" where uuid = '<workspace_id>';

redis delete cache

bash
redis-cli -h redis.middleware:6376
inside_redis-cli
auth <password>
hgetall wkspInfo:<workspace_id>
del wkspInfo:<workspace_id>

hget doris_store_info <workspace_id>
hdel doris_store_info <workspace_id>