Hello everyone,
I have been running some benchmark on our upcoming servers. We are
switching from a Bluedragon Free + MySQL 5.0 to OpenBD 1.4 + MySQL
5.5. We have long since outgrown our current setup.
During the benchmarks I stumbled upon the same problem we have been
experiencing with Bluedragon free - apparent query cache key
collision. Now that I'm benchmarking in a "sterile environment", it's
hopefully much easier tracking down these problems.
In short the problem is that every now and then BD throws errors like:
get_picture.picture_id doesn't exist.
>From variable dump:
query [long version]
manufacturer_name model_name ...
1 Sony HDR-TG3 sony_hdr-tg3 ...
Query Source: SQL (FROM CACHE)
Datasource: DS
Query: select picture_id, picture_extension from hardware_pictures
where hardware_id=20008 and approved=1 and main_picture=1
Time: 0 ms
As you can see from the columns, the cached query is something
completely different than the one in the query string.
This smells alot like a query cache key/hash collision. Out of the
about 33 "query.column doesn't exist" errors 30 came from the same
exact query. One was caused by the same template and same query
(get_pictures) but with a different hardware_id. Two others were from
completely different templates and queries.
The query result that is fetched from the cache is always different,
and from various different (and unrelated) tables. Most of the
problematic queries are using cachedAfter, but some are cached using
cachedWithin.
This is just a hunch, but it could be that the checkSum.quick method
used by CacheFactory.createCacheKey doesn't really produce reliably
unique checksums, and possibly shouldn't be used for generating cache
keys?
Jari
--
official tag/function reference: http://openbd.org/manual/
mailing list - http://groups.google.com/group/openbd?hl=en