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
2 changes: 1 addition & 1 deletion devbin/model_extractor/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ int main(int argc, char** argv) {
while (restoredJob.restoreState(restoreSearcher, completeToTime)) {
assert(completeToTime > prevCompleteToTime);
prevCompleteToTime = completeToTime;
LOG_DEBUG(<< "Restore complete to time " << completeToTime << std::endl);
LOG_DEBUG(<< "Restore complete to time " << completeToTime);

core::CNamedPipeFactory::TOStreamP persistStrm{&ioMgr.outputStream(),
[](std::ostream*) {}};
Expand Down
6 changes: 6 additions & 0 deletions docs/CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@

//=== Regressions

== {es} version 8.6.0

=== Bug Fixes

* Fix for 'No statistics' error message. (See {ml-pull}2410[#2410].)

== {es} version 8.5.0

=== Enhancements
Expand Down
6 changes: 4 additions & 2 deletions lib/model/CIndividualModel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,10 @@ bool CIndividualModel::isPopulation() const {
CIndividualModel::TOptionalUInt64
CIndividualModel::currentBucketCount(std::size_t pid, core_t::TTime time) const {
if (!this->bucketStatsAvailable(time)) {
LOG_ERROR(<< "No statistics at " << time
<< ", current bucket = " << this->printCurrentBucket());
LOG_ERROR(<< "No statistics at " << time << " for " << this->description()
<< ", current bucket = " << this->printCurrentBucket()
<< ", partitionFieldValue = " << this->dataGatherer().partitionFieldValue()
<< ", personName = " << this->dataGatherer().personName(pid));
return TOptionalUInt64();
}

Expand Down
10 changes: 7 additions & 3 deletions lib/model/CMetricModel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,17 @@ void CMetricModel::sample(core_t::TTime startTime,
CDataGatherer& gatherer = this->dataGatherer();
core_t::TTime bucketLength = gatherer.bucketLength();

if (!gatherer.validateSampleTimes(startTime, endTime)) {
return;
}
m_CurrentBucketStats.s_StartTime = std::max(m_CurrentBucketStats.s_StartTime, startTime);

this->createUpdateNewModels(startTime, resourceMonitor);
m_CurrentBucketStats.s_InterimCorrections.clear();
m_CurrentBucketStats.s_Annotations.clear();
m_CurrentBucketStats.s_FeatureData.clear();
m_CurrentBucketStats.s_PersonCounts.clear();

if (!gatherer.validateSampleTimes(startTime, endTime)) {
return;
}

for (core_t::TTime time = startTime; time < endTime; time += bucketLength) {
LOG_TRACE(<< "Sampling [" << time << "," << time + bucketLength << ")");
Expand Down