File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed 
ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/LedgerDB Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -781,6 +781,7 @@ newForker h ldbEnv rr (st, rk) = do
781781          , foeSwitchVar =  ldbSeq ldbEnv
782782          , foeTracer =  tr
783783          , foeResourcesToRelease =  (ldbOpenHandlesLock ldbEnv, k, toRelease)
784+           , foeInitialHandleKey =  rk
784785          }
785786  atomically $  modifyTVar (ldbForkers ldbEnv) $  Map. insert forkerKey forkerEnv
786787  pure  $ 
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ module Ouroboros.Consensus.Storage.LedgerDB.V2.Forker
1919  , module  Ouroboros.Consensus.Storage.LedgerDB.Forker 
2020  ) where 
2121
22+ import  qualified  Control.Monad  as  Monad 
2223import  Control.RAWLock  hiding  (read )
2324import  Control.ResourceRegistry 
2425import  Control.Tracer 
@@ -52,6 +53,7 @@ data ForkerEnv m l blk = ForkerEnv
5253  --  ^  Config 
5354  , foeResourcesToRelease  ::  ! (RAWLock  m  () , ResourceKey  m , StrictTVar  m  (m  () ))
5455  --  ^  Release the resources 
56+   , foeInitialHandleKey  ::  ! (ResourceKey  m )
5557  } 
5658  deriving  Generic 
5759
@@ -172,7 +174,7 @@ implForkerCommit env = do
172174                -- 
173175                --  The rest of the states in the forker will be closed via
174176                --  @foeResourcesToRelease@ instead of via the registry.
175-                 close  $  tables  $   AS. anchor lseq 
177+                 Monad. void  $  release foeInitialHandleKey 
176178          pure  (closeDiscarded, LedgerSeq  newdb)
177179      )
178180
@@ -186,6 +188,7 @@ implForkerCommit env = do
186188    { foeLedgerSeq
187189    , foeSwitchVar
188190    , foeResourcesToRelease
191+     , foeInitialHandleKey
189192    } =  env
190193
191194  theImpossible = 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments