From 54c09a1e15d7636343f6875c77d8049e48bcf7a1 Mon Sep 17 00:00:00 2001
From: Roel Aaij <roel.aaij@cern.ch>
Date: Mon, 24 Apr 2023 15:58:00 +0200
Subject: [PATCH] [MEPProvider] Erase transposed marker when discarding slice

---
 AllenOnline/src/MEPProvider.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/AllenOnline/src/MEPProvider.cpp b/AllenOnline/src/MEPProvider.cpp
index e3fbd85a3..7262cb422 100755
--- a/AllenOnline/src/MEPProvider.cpp
+++ b/AllenOnline/src/MEPProvider.cpp
@@ -1672,6 +1672,10 @@ void MEPProvider::transpose( int thread_id ) {
       }
     } else {
       // Discard the slice if there is no valid ODIN
+      {
+        std::scoped_lock lock{m_transpose_mut, m_buffer_mutex};
+        m_transposed.erase( transpose_it );
+      }
       if ( msgLevel( MSG::DEBUG ) ) {
         debug() << "Transpose " << thread_id << ": No ODIN; discard slice " << *slice_index << endmsg;
       }
-- 
GitLab