@@ -1718,27 +1718,19 @@ maybe_write_index_to_disk(_Force, MsgStatus = #msg_status {
17181718 index_on_disk = true }, State ) ->
17191719 {MsgStatus , State };
17201720maybe_write_index_to_disk (Force , MsgStatus = # msg_status {
1721- msg = Msg ,
17221721 msg_id = MsgId ,
17231722 seq_id = SeqId ,
17241723 is_persistent = IsPersistent ,
17251724 msg_location = MsgLocation ,
17261725 msg_props = MsgProps },
1727- State = # vqstate {disk_write_count = DiskWriteCount ,
1728- index_state = IndexState })
1726+ State = # vqstate {index_state = IndexState })
17291727 when Force orelse IsPersistent ->
1730- {MsgOrId , DiskWriteCount1 } =
1731- case persist_to (MsgStatus ) of
1732- msg_store -> {MsgId , DiskWriteCount };
1733- queue_store -> {MsgId , DiskWriteCount }
1734- end ,
17351728 IndexState2 = rabbit_classic_queue_index_v2 :publish (
1736- MsgOrId , SeqId , MsgLocation , MsgProps , IsPersistent ,
1729+ MsgId , SeqId , MsgLocation , MsgProps , IsPersistent ,
17371730 persist_to (MsgStatus ) =:= msg_store ,
17381731 IndexState ),
17391732 {MsgStatus # msg_status {index_on_disk = true },
1740- State # vqstate {index_state = IndexState2 ,
1741- disk_write_count = DiskWriteCount1 }};
1733+ State # vqstate {index_state = IndexState2 }};
17421734
17431735maybe_write_index_to_disk (_Force , MsgStatus , State ) ->
17441736 {MsgStatus , State }.
0 commit comments