key rename not working
We are using tile38 version "1.34.0" in docker container environent. While renaming a key getting error "(error) key has hooks set" .----------------- 127.0.0.1:19851> rename a a1 (error) key has hooks set
This is same for all other key also
Do you have any hooks watching on that key?
The hooks * command will show all the hooks.
No hooks are present
-- 127.0.0.1:19851> hooks * {"ok":true,"hooks":[],"elapsed":"20.158µs"} 127.0.0.1:19851> rename b b1 (error) key has hooks set
How about channels? This may cause the same error.
chans *
See some channels are created but we haven't manually created any channels.
127.0.0.1:19851> chans * {"ok":true,"chans":[{"name":"viewAOR","key":"AOR","ttl":-1,"command":["WITHIN","AOR","FENCE","DETECT","enter,exit,cross,inside","BOUNDS","-180","0","180","180"],"meta":{}},{"name":"viewAORFR","key":"AORFR","ttl":-1,"command":["WITHIN","AORFR","FENCE","DETECT","enter,exit,cross,inside","BOUNDS","-180","0","180","180"],"meta":{}},{"name":"viewAORWWD","key":"AORWWD","ttl":-1,"command":["WITHIN","AORWWD","FENCE","DETECT","enter,exit,cross,inside","BOUNDS","-180","0","180","180"],"meta":{}},{"name":"viewGeocode","key":"Geocode","ttl":-1,"command":["WITHIN","Geocode","FENCE","DETECT","enter,exit,cross,inside","BOUNDS","-180","0","180","180"],"meta":{}},{"name":"viewOsmoneway","key":"Osmoneway","ttl":-1,"command":["WITHIN","Osmoneway","FENCE","DETECT","enter,exit,cross,inside","BOUNDS","-180","0","180","180"],"meta":{}},{"name":"viewOsmways","key":"Osmways","ttl":-1,"command":["WITHIN","Osmways","FENCE","DETECT","enter,exit,cross,inside","BOUNDS","-180","0","180","180"],"meta":{}},{"name":"viewa","key":"a","ttl":-1,"command":["WITHIN","a","FENCE","DETECT","enter,exit,cross,inside","BOUNDS","-180","0","180","180"],"meta":{}},{"name":"viewb","key":"b","ttl":-1,"command":["WITHIN","b","FENCE","DETECT","enter,exit,cross,inside","BOUNDS","-180","0","180","180"],"meta":{}}],"elapsed":"97.255µs"}
is there a data folder that your tile38 instance can pick up an appendonly file from?
Yes,persistence is there
tile38-server", "-d", "/tile38/data", "--appendonly", "yes"
You'll need to delete the "viewa" channel before it you can rename the "a" collection.
Tile38 stores every command you execute in an appendonly file in your /tile38/data directory. On start-up it will read back whats in your /tile38/data folder into memory, that is why you see the channel here. Make sure that you clean out the folder, if you want to have a fresh instance.
Thanks I can rename the key after delete the channel.