Skip to content

Commit

Permalink
Merge pull request #5023 from ggovi/new-conddb-caching-fix
Browse files Browse the repository at this point in the history
Fixed iov caching for edge conditions on non-ordered queries
  • Loading branch information
ktf committed Aug 22, 2014
2 parents 1921c89 + 8e48f56 commit b3035e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CondCore/CondDB/src/IOVProxy.cc
Expand Up @@ -24,6 +24,7 @@ namespace cond {
// iov data
cond::Time_t lowerGroup = cond::time::MAX_VAL;
cond::Time_t higherGroup = cond::time::MIN_VAL;
cond::Time_t groupEdge = cond::time::MIN_VAL;
std::vector<cond::Time_t> sinceGroups;
IOVProxy::IOVContainer iovSequence;
size_t numberOfQueries = 0;
Expand Down Expand Up @@ -208,6 +209,8 @@ namespace cond {

m_data->lowerGroup = lowerGroup;
m_data->higherGroup = higherGroup;
m_data->groupEdge = higherGroup;
if( higherGroup < cond::time::MAX_VAL && !m_data->iovSequence.empty() ) m_data->groupEdge = std::get<0>(m_data->iovSequence.back());

m_data->numberOfQueries++;
}
Expand Down Expand Up @@ -249,7 +252,7 @@ namespace cond {

if( m_data->lowerGroup==cond::time::MAX_VAL ||
// case 1 : target outside
time < m_data->lowerGroup || time>= m_data->higherGroup ){
time < m_data->lowerGroup || time>= m_data->groupEdge ){

// a new query required!
// first determine the groups
Expand Down

0 comments on commit b3035e9

Please sign in to comment.