tile38 icon indicating copy to clipboard operation
tile38 copied to clipboard

key rename not working

Open itsandiproy opened this issue 11 months ago • 9 comments

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

itsandiproy avatar Jan 21 '25 17:01 itsandiproy

Do you have any hooks watching on that key? The hooks * command will show all the hooks.

tidwall avatar Jan 22 '25 12:01 tidwall

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

itsandiproy avatar Jan 22 '25 17:01 itsandiproy

How about channels? This may cause the same error.

chans *

tidwall avatar Jan 22 '25 18:01 tidwall

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"}

itsandiproy avatar Jan 24 '25 05:01 itsandiproy

is there a data folder that your tile38 instance can pick up an appendonly file from?

iwpnd avatar Jan 24 '25 05:01 iwpnd

Yes,persistence is there

tile38-server", "-d", "/tile38/data", "--appendonly", "yes"

itsandiproy avatar Jan 24 '25 06:01 itsandiproy

You'll need to delete the "viewa" channel before it you can rename the "a" collection.

tidwall avatar Jan 25 '25 03:01 tidwall

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.

iwpnd avatar Jan 25 '25 08:01 iwpnd

Thanks I can rename the key after delete the channel.

itsandiproy avatar Jan 25 '25 19:01 itsandiproy