Hello, recently i have written a patch for supporting ssd, see
https://cwiki.apache.org/TS/ssdsupport.html.
    My logic is like following:
    (1) If not hit in cache, then request from os, and write the response to
sata
    (2) If hit in sata, and need to write content to ram_cache, then write
it to ssd also
    (3) When CacheProcessor::open_read, it first read in ssd, and if not
probe hit in ssd, then read in sata
    I surround my codes with
    #ifdef CACHE_SSD
    ....
    #endif
    and to ease the coding work, the patch support only for following
situation: one ssd plus several sata.
    Now we are testing this patch, first step is to test it works as expect.
We write a script to infinite send lots of request for urls, and then send
purge command, and then again requests and so on. The result
shows that it works as we expect. Next step we will test the performance of
this patch.
    Now i have encounter a problem, when ./configure --enable-debug, it will
crash after some minutes, the error message is fail assert, in function
CacheVC::handleReadDone of iocore/cache/Cache.cc, line "ink_assert(((Doc *)
buf->data())->magic == DOC_MAGIC);" I am tracing the bug, and i want to
reproduce this scene again. I am thinking if my following logic is right or
wrong:
    When the object is stored in both ssd and sata, but staled, ts will get
the object from os and write it to sata. In this situation, i delete the Dir
in ssd related with that staled object. I don't know when staled in current
cache, if or not ts delete the staled object?
    I will be appreciated for your advices. If you think i need to submit my
patch right now and you help me to review the codes, then tell me(I think
the codes is ugly to simplify the coding load:( )


-- 
Best regards,
Lian Zhang(mohan_zl)

Reply via email to