Friday, May 16, 2008

Revalidating objects in Polygraph

I have a locally hacked up polygraph config based on datacomm-1. Datacomm-1 is a very simple workload which doesn't pretend to be the real world at all; it thus makes it really easy for me to implement custom bits of polygraph to test specific things.

One thing I needed to test was object revalidation. I needed objects to be revalidated in a relatively short period of time so I could trigger a storage revalidation bug in Squid-2.HEAD.

Here's the changes.

include/; added:

ObjLifeCycle olcRevalid = {
  length = const(2min);   
  variance = 50%;
  with_lmt = 100%;
  expires = [
    lmt + const(2min) : 5%,
    now + const(5min) : 15%

content cntRevalid = {
  kind = "revalid";
  obj_life_cycle = olcRevalid;
  size = logn(32KB, 32KB);
  cachable = 80%;
  checksum = 1%;

I then edited my locally modified to set the contents to cntRevalid.

Now, I get stale objects popping up during the test - and I need to figure out why -that- is happening - but note that my life cycles are very quick (couple minutes). squid _should_ be good down to object lifetime of 1 second so I'm a bit surprised.

In any case, it tripped the bug, which is all that matters..

No comments:

Post a Comment