@@ -265,11 +265,11 @@ let handleAppendEntriesResponse = (
265265 } else if state .raft .role == Leader {
266266 if response .success {
267267 // Update nextIndex and matchIndex for the follower
268- let nextIndex = Js . Dict .fromArray (Js . Dict .entries (state .raft .nextIndex ))
269- let matchIndex = Js . Dict .fromArray (Js . Dict .entries (state .raft .matchIndex ))
268+ let nextIndex = Dict .fromArray (Dict .entries (state .raft .nextIndex ))
269+ let matchIndex = Dict .fromArray (Dict .entries (state .raft .matchIndex ))
270270
271- Js . Dict .set (nextIndex , fromPeer , response .matchIndex + 1 )
272- Js . Dict .set (matchIndex , fromPeer , response .matchIndex )
271+ Dict .set (nextIndex , fromPeer , response .matchIndex + 1 )
272+ Dict .set (matchIndex , fromPeer , response .matchIndex )
273273
274274 let raft = {... state .raft , nextIndex : nextIndex , matchIndex : matchIndex }
275275 // Try to advance commit index
@@ -278,10 +278,10 @@ let handleAppendEntriesResponse = (
278278 {... state , raft : raft }
279279 } else {
280280 // Decrement nextIndex for the follower and retry
281- let nextIndex = Js . Dict .fromArray (Js . Dict .entries (state .raft .nextIndex ))
281+ let nextIndex = Dict .fromArray (Dict .entries (state .raft .nextIndex ))
282282 let currentNext =
283- Js . Dict .get (nextIndex , fromPeer )-> Belt .Option .getWithDefault (1 )
284- Js . Dict .set (nextIndex , fromPeer , Js .Math .max_int (currentNext - 1 , 1 ))
283+ Dict .get (nextIndex , fromPeer )-> Belt .Option .getWithDefault (1 )
284+ Dict .set (nextIndex , fromPeer , Js .Math .max_int (currentNext - 1 , 1 ))
285285
286286 {... state , raft : {... state .raft , nextIndex : nextIndex }}
287287 }
@@ -354,7 +354,7 @@ let proposeUpdateTrust = (
354354let proposeMapHexad = (
355355 state : clusterState ,
356356 hexadId : string ,
357- locations : Js . Dict .t <Js .Json .t >,
357+ locations : Dict .t <Js .Json .t >,
358358): (clusterState , clientResult ) => {
359359 propose (
360360 state ,
@@ -377,21 +377,21 @@ let applyCommand = (registry: Registry.registryState, command: MetadataLog.comma
377377
378378 | UnregisterStore ({storeId }) => {
379379 // Remove store from registry
380- let newStores = Js . Dict .fromArray (
381- Js . Dict .entries (registry .stores )-> Belt .Array .keep (((id , _ )) => id != storeId ),
380+ let newStores = Dict .fromArray (
381+ Dict .entries (registry .stores )-> Belt .Array .keep (((id , _ )) => id != storeId ),
382382 )
383383 {... registry , stores : newStores }
384384 }
385385
386386 | MapHexad ({hexadId , locations }) => {
387387 // Convert JSON locations to storeLocation dict
388388 // In production, would deserialize properly
389- Registry .map (registry , hexadId , Js . Dict .empty ())
389+ Registry .map (registry , hexadId , Dict .empty ())
390390 }
391391
392392 | UnmapHexad ({hexadId }) => {
393- let newMappings = Js . Dict .fromArray (
394- Js . Dict .entries (registry .mappings )-> Belt .Array .keep (((id , _ )) => id != hexadId ),
393+ let newMappings = Dict .fromArray (
394+ Dict .entries (registry .mappings )-> Belt .Array .keep (((id , _ )) => id != hexadId ),
395395 )
396396 {... registry , mappings : newMappings }
397397 }
@@ -520,8 +520,8 @@ let diagnostics = (state: clusterState): clusterDiagnostics => {
520520 logLength : Belt .Array .length (state .raft .log ),
521521 peerCount : Belt .Array .length (state .config .peers ),
522522 leaderId : state .leaderId ,
523- registeredStores : Belt .Array .length (Js . Dict .keys (state .registry .stores )),
524- mappedHexads : Belt .Array .length (Js . Dict .keys (state .registry .mappings )),
523+ registeredStores : Belt .Array .length (Dict .keys (state .registry .stores )),
524+ mappedHexads : Belt .Array .length (Dict .keys (state .registry .mappings )),
525525 totalCommitted : state .totalCommitted ,
526526 totalApplied : state .totalApplied ,
527527 electionCount : state .electionCount ,
0 commit comments