Commit be7104fa authored by Bas Lijnse's avatar Bas Lijnse

Changed the default cache write policy for standard stores. Delayed writing...

Changed the default cache write policy for standard stores. Delayed writing breaks local task share notification.
parent de1cd274
Pipeline #22397 canceled with stage
...@@ -435,6 +435,7 @@ instance Writeable SDSCache where ...@@ -435,6 +435,7 @@ instance Writeable SDSCache where
(Error e, iworld) = (Error e, iworld) (Error e, iworld) = (Error e, iworld)
(Ok (WriteResult r ssds), iworld) = (Ok (WriteResult r sds), iworld) (Ok (WriteResult r ssds), iworld) = (Ok (WriteResult r sds), iworld)
WriteDelayed WriteDelayed
//FIXME: Even though write is delayed, the notification should still happen
# writeCache = 'DM'.put key (dynamic w :: w^, DeferredWrite p w sds1) writeCache # writeCache = 'DM'.put key (dynamic w :: w^, DeferredWrite p w sds1) writeCache
= (Ok (WriteResult 'Set'.newSet sds), {iworld & readCache = readCache, writeCache = writeCache}) = (Ok (WriteResult 'Set'.newSet sds), {iworld & readCache = readCache, writeCache = writeCache})
......
...@@ -52,8 +52,8 @@ rawInstanceOutput = storeShare NS_TASK_INSTANCES False InMemory (Just 'DM'.ne ...@@ -52,8 +52,8 @@ rawInstanceOutput = storeShare NS_TASK_INSTANCES False InMemory (Just 'DM'.ne
rawInstanceReduct = mbStoreShare NS_TASK_INSTANCES True InDynamicFile rawInstanceReduct = mbStoreShare NS_TASK_INSTANCES True InDynamicFile
rawInstanceValue = mbStoreShare NS_TASK_INSTANCES True InDynamicFile rawInstanceValue = mbStoreShare NS_TASK_INSTANCES True InDynamicFile
rawInstanceShares = mbStoreShare NS_TASK_INSTANCES True InDynamicFile //(Just 'DM'.newMap) rawInstanceShares = mbStoreShare NS_TASK_INSTANCES True InDynamicFile
rawInstanceParallels = mbStoreShare NS_TASK_INSTANCES True InDynamicFile //(Just 'DM'.newMap) rawInstanceParallels = mbStoreShare NS_TASK_INSTANCES True InDynamicFile
//Master instance index //Master instance index
taskInstanceIndex :: SimpleSDSLens [TIMeta] taskInstanceIndex :: SimpleSDSLens [TIMeta]
......
...@@ -118,10 +118,10 @@ where ...@@ -118,10 +118,10 @@ where
choice (path,_ ) = Right (addExtension path "bin") choice (path,_ ) = Right (addExtension path "bin")
jsonLoc :: SDSCache FilePath (Maybe a) (Maybe a) | JSONEncode{|*|}, JSONDecode{|*|}, TC a jsonLoc :: SDSCache FilePath (Maybe a) (Maybe a) | JSONEncode{|*|}, JSONDecode{|*|}, TC a
jsonLoc = sdsCache (\_ _ _ w -> (Just w,WriteDelayed)) jsonFileShare jsonLoc = sdsCache (\_ _ _ w -> (Just w,WriteNow)) jsonFileShare
graphLoc :: SDSCache FilePath (Maybe a) (Maybe a) | JSONEncode{|*|}, JSONDecode{|*|}, TC a graphLoc :: SDSCache FilePath (Maybe a) (Maybe a) | JSONEncode{|*|}, JSONDecode{|*|}, TC a
graphLoc = sdsCache (\_ _ _ w -> (Just w,WriteDelayed)) graphFileShare graphLoc = sdsCache (\_ _ _ w -> (Just w,WriteNow)) graphFileShare
//Utility function to make sure we don't use names that escape the file path //Utility function to make sure we don't use names that escape the file path
safeName :: !String -> String safeName :: !String -> String
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment