logic: fix error recording for multi-threaded custom command indexing (issue #1043) (#1049)

In multi-threaded custom command indexing errors were read from the wrong storage.
This commit is contained in:
Malte Langkabel
2020-06-29 19:25:26 +02:00
committed by GitHub
parent 27558c42bb
commit 7008d2abdd
4 changed files with 61 additions and 13 deletions
+6 -1
View File
@@ -260,6 +260,11 @@ void PersistentStorage::rollbackInjection()
afterErrorRecording();
}
const std::vector<ErrorInfo> PersistentStorage::getErrorInfos() const
{
return m_sqliteIndexStorage.getAllErrorInfos();
}
void PersistentStorage::beforeErrorRecording()
{
m_preInjectionErrorCount = m_sqliteIndexStorage.getErrorCount();
@@ -273,7 +278,7 @@ void PersistentStorage::beforeErrorRecording()
void PersistentStorage::afterErrorRecording()
{
std::vector<ErrorInfo> errors = m_sqliteIndexStorage.getAllErrorInfos();
std::vector<ErrorInfo> errors = getErrorInfos();
if (m_preInjectionErrorCount < errors.size())
{
ErrorCountInfo errorCount(errors);