Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions iocore/cache/CacheWrite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ Vol::evacuateDocReadDone(int event, Event *e)
if (!b) {
goto Ldone;
}
if ((b->f.pinned && !b->readers) && doc->pinned < static_cast<uint32_t>(Thread::get_hrtime() / HRTIME_SECOND)) {
if ((b->f.pinned && !b->readers) && doc->pinned < static_cast<time_t>(Thread::get_hrtime() / HRTIME_SECOND)) {
goto Ldone;
}

Expand Down Expand Up @@ -817,7 +817,7 @@ agg_copy(char *p, CacheVC *vc)
doc->checksum = DOC_NO_CHECKSUM;
if (vc->pin_in_cache) {
dir_set_pinned(&vc->dir, 1);
doc->pinned = static_cast<uint32_t>(Thread::get_hrtime() / HRTIME_SECOND) + vc->pin_in_cache;
doc->pinned = static_cast<time_t>(Thread::get_hrtime() / HRTIME_SECOND) + vc->pin_in_cache;
} else {
dir_set_pinned(&vc->dir, 0);
doc->pinned = 0;
Expand Down Expand Up @@ -1720,7 +1720,7 @@ Cache::open_write(Continuation *cont, const CacheKey *key, CacheFragType frag_ty
c->f.overwrite = (options & CACHE_WRITE_OPT_OVERWRITE) != 0;
c->f.close_complete = (options & CACHE_WRITE_OPT_CLOSE_COMPLETE) != 0;
c->f.sync = (options & CACHE_WRITE_OPT_SYNC) == CACHE_WRITE_OPT_SYNC;
c->pin_in_cache = static_cast<uint32_t>(apin_in_cache);
c->pin_in_cache = apin_in_cache;

if ((res = c->vol->open_write_lock(c, false, 1)) > 0) {
// document currently being written, abort
Expand Down Expand Up @@ -1820,7 +1820,7 @@ Cache::open_write(Continuation *cont, const CacheKey *key, CacheHTTPInfo *info,
c->base_stat = cache_write_active_stat;
}
CACHE_INCREMENT_DYN_STAT(c->base_stat + CACHE_STAT_ACTIVE);
c->pin_in_cache = static_cast<uint32_t>(apin_in_cache);
c->pin_in_cache = apin_in_cache;

{
CACHE_TRY_LOCK(lock, c->vol->mutex, cont->mutex->thread_holding);
Expand Down
2 changes: 1 addition & 1 deletion iocore/cache/P_CacheInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ struct CacheVC : public CacheVConnection {
Event *trigger;
CacheKey *read_key;
ContinuationHandler save_handler;
uint32_t pin_in_cache;
time_t pin_in_cache;
ink_hrtime start_time;
int base_stat;
int recursive;
Expand Down
2 changes: 1 addition & 1 deletion iocore/cache/P_CacheVol.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ struct Doc {
uint32_t unused : 8; ///< Unused, forced to zero.
uint32_t sync_serial;
uint32_t write_serial;
uint32_t pinned; // pinned until
uint32_t checksum;
time_t pinned; // pinned until
#if TS_ENABLE_FIPS == 1
CryptoHash key; ///< Key for this doc.
#endif
Expand Down