Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

key rename not working #764

Open
itsandiproy opened this issue Jan 21, 2025 · 9 comments
Open

key rename not working #764

itsandiproy opened this issue Jan 21, 2025 · 9 comments

Comments

@itsandiproy
Copy link

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

@tidwall
Copy link
Owner

tidwall commented Jan 22, 2025

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

@itsandiproy
Copy link
Author

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

@tidwall
Copy link
Owner

tidwall commented Jan 22, 2025

How about channels? This may cause the same error.

chans *

@itsandiproy
Copy link
Author

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

@iwpnd
Copy link
Contributor

iwpnd commented Jan 24, 2025

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

@itsandiproy
Copy link
Author

Yes,persistence is there

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

@tidwall
Copy link
Owner

tidwall commented Jan 25, 2025

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

@iwpnd
Copy link
Contributor

iwpnd commented Jan 25, 2025

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.

@itsandiproy
Copy link
Author

Thanks I can rename the key after delete the channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants