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
SSDB + delete items by Tag #411
Comments
I use code below to set tags (2 tags for this key):
|
ssdb logs:
As you can see, there are errors: 2017-01-04 19:38:50.679 [ERROR] t_zset.cpp(341): key too long! Result: delete fails, objects are still in cache. |
According to http://ssdb.io/docs/limit.html - Will you please clarify what should i do in order not to get this error? Thanks! |
I'll will have a look tonight :)
Le 4 janv. 2017 5:43 PM, "Anton" <notifications@github.com> a écrit :
… More of logs:
1. Creating 2 objects with keys '//example.com/c/united-
states/ca/los-angeles/cafes' (1), '//example.com/c/united-
states/ca/los-angeles/bakeries' (2) (thats an comressed html page)
with tags ['los-angeles/cafes', 'category'] (1) and
['los-angeles/bakeries', 'category'] (2):
2017-01-04 19:37:30.699 [DEBUG] server.cpp(246): new link from 127.0.0.1:58016, fd: 18, links: 1
2017-01-04 19:37:30.700 [DEBUG] server.cpp(340): w:0.021,p:1.063, req: flushdb kv, resp: ok
2017-01-04 19:37:30.700 [DEBUG] server.cpp(415): fd: 18, read: 0, delete link, s:0.001
2017-01-04 19:37:36.247 [DEBUG] server.cpp(246): new link from 127.0.0.1:58018, fd: 18, links: 1
2017-01-04 19:37:36.248 [DEBUG] server.cpp(340): w:0.049,p:0.019, req: get //example.com/c/united-states/ca/los-angeles/cafes, resp: not_found
2017-01-04 19:37:37.264 [DEBUG] server.cpp(340): w:0.040,p:0.164, req: setx [51] [15346] 1798907857, resp: ok 1
2017-01-04 19:37:37.264 [DEBUG] server.cpp(340): w:0.039,p:0.012, req: get _TAG_los-angeles/cafes, resp: not_found
2017-01-04 19:37:37.265 [DEBUG] server.cpp(340): w:0.015,p:0.010, req: get _TAG_category, resp: not_found
2017-01-04 19:37:37.265 [DEBUG] server.cpp(340): w:0.034,p:0.060, req: setx _TAG_los-angeles/cafes [228] 1798907857, resp: ok 1
2017-01-04 19:37:37.265 [DEBUG] server.cpp(340): w:0.008,p:0.050, req: setx _TAG_category [228] 1798907857, resp: ok 1
2017-01-04 19:37:37.271 [DEBUG] server.cpp(415): fd: 18, read: 0, delete link, s:1.023
2017-01-04 19:37:43.108 [DEBUG] server.cpp(246): new link from 127.0.0.1:58020, fd: 18, links: 1
2017-01-04 19:37:43.108 [DEBUG] server.cpp(340): w:0.024,p:0.041, req: get //example.com/c/united-states/ca/los-angeles/bakeries, resp: not_found
2017-01-04 19:37:43.870 [DEBUG] server.cpp(340): w:0.018,p:0.182, req: setx [54] [15980] 1798907863, resp: ok 1
2017-01-04 19:37:43.871 [DEBUG] server.cpp(340): w:0.031,p:0.021, req: get _TAG_los-angeles/bakeries, resp: not_found
2017-01-04 19:37:43.871 [DEBUG] server.cpp(340): w:0.017,p:0.011, req: get _TAG_category, resp: ok [228]
2017-01-04 19:37:43.871 [DEBUG] server.cpp(340): w:0.009,p:0.059, req: setx _TAG_los-angeles/bakeries [231] 1798907863, resp: ok 1
2017-01-04 19:37:43.871 [DEBUG] server.cpp(340): w:0.009,p:0.042, req: setx _TAG_category [303] 1798907863, resp: ok 1
2017-01-04 19:37:43.878 [DEBUG] server.cpp(415): fd: 18, read: 0, delete link, s:0.770
1. Trying to delete them using tag "category":
2017-01-04 19:38:50.677 [DEBUG] server.cpp(246): new link from 127.0.0.1:58022, fd: 18, links: 1
2017-01-04 19:38:50.678 [DEBUG] server.cpp(340): w:0.040,p:0.024, req: get _TAG_category, resp: ok [303]
2017-01-04 19:38:50.678 [DEBUG] server.cpp(340): w:0.040,p:0.024, req: get //example.com/c/united-states/ca/los-angeles/cafes, resp: ok [15346]
2017-01-04 19:38:50.678 [DEBUG] server.cpp(340): w:0.074,p:0.034, req: get //example.com/c/united-states/ca/los-angeles/bakeries, resp: ok [15980]
2017-01-04 19:38:50.679 [ERROR] t_zset.cpp(341): key too long!
2017-01-04 19:38:50.679 [DEBUG] server.cpp(340): w:0.020,p:0.288, req: del [15137], resp: ok 1
2017-01-04 19:38:50.679 [ERROR] t_zset.cpp(341): key too long!
2017-01-04 19:38:50.680 [DEBUG] server.cpp(340): w:0.021,p:0.264, req: del [15768], resp: ok 1
2017-01-04 19:38:50.680 [DEBUG] server.cpp(415): fd: 18, read: 0, delete link, s:0.002
Result: delete fails, objects are still in cache.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#411 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABRTZxbVMsJaZQv_yeplSmxqHQ5Zv01Dks5rO8xHgaJpZM4LavW8>
.
|
Thanks, hope we will resolve this issue. Just tried to use md5(url) as key (md5 always has length = 32 symbols) (which is less then 200 bytes SSDB key limit). But nothing changes: create: |
I'm gonna install Ssdb soon, hang tight :) |
The MD5 clue seems to be a valid one, I'm testing some things. |
Found it, I'm a damn idiot, the 32 chars limitation is not the only one issue: I'm calling $item->get() instead of $item->getKey() .... |
- Removed unused method encodeFilename() on DriverBaseTrait - Fixed #411
I added a fix on final branch, try it :) |
Lightning fast :) Will now check it, and respond. |
V6 is now patched too. |
Work as expected, issue closed. p.s. thanks for being so fast to resolve bugs :) |
I'll release tonigh :) |
Thank you! |
Hi, reopened issue due to this: Updated my production server with composer to v. 5.0.13, and cache cleaning by tag does not seems to be working. Looked into local sources, that i got from composer (packagist):
while here in github actual is:
Please, update packagist with current, actual version. |
According to https://packagist.org/packages/phpfastcache/phpfastcache#5.0.13, its package was uploaded 2017-01-01, while this isuue was resolved at 2017-01-04. |
Also: |
Hello @git-webmaster I think I made a mistake on the git tag, I will release a 5.0.14 tonight with the right commit target. The V6 is still in beta state for now, but a stable release should be out in the next 2 months. Cheers, |
Thanks, Georges! |
###Configuration:
PhpFastCache version:
5.0.12
PHP version:
7.0.14 x64 NTS
Operating system:
Debian 8 x64
SSDB version:
Ssdb-server v1.9.4
####Issue description:
Hi again.
I use code below to delete items by tags:
$pfc_instance->deleteItemsByTag($key);
or by key:
$pfc_instance->deleteItem($key);
Both of this methods are not working with SSDB in my case.
When i switch driver to "files" or "sqlite", all things work as expected.
When on SSDB i am able only to run:
$pfc_instance->clear();
And clear all cache data, but in my case this is not acceptable at all.
Will you please check and confirm this issue?
The text was updated successfully, but these errors were encountered: