@@ -995,12 +995,26 @@ terminate(_Reason, State = #msstate { index_state = IndexState,
995
995
State2
996
996
end ,
997
997
State3 = close_all_handles (State1 ),
998
- ok = store_file_summary (FileSummaryEts , Dir ),
998
+ % % Let file summary saving fail.
999
+ case store_file_summary (FileSummaryEts , Dir ) of
1000
+ ok -> ok ;
1001
+ {error , FSErr } ->
1002
+ rabbit_log :error (" Unable to store file summary"
1003
+ " for vhost message store for directory ~p~n "
1004
+ " Error: ~p~n " ,
1005
+ [Dir , FSErr ])
1006
+ end ,
999
1007
[true = ets :delete (T ) || T <- [FileSummaryEts , FileHandlesEts ,
1000
1008
CurFileCacheEts , FlyingEts ]],
1001
1009
IndexModule :terminate (IndexState ),
1002
- ok = store_recovery_terms ([{client_refs , dict :fetch_keys (Clients )},
1003
- {index_module , IndexModule }], Dir ),
1010
+ case store_recovery_terms ([{client_refs , dict :fetch_keys (Clients )},
1011
+ {index_module , IndexModule }], Dir ) of
1012
+ ok -> ok ;
1013
+ {error , RTErr } ->
1014
+ rabbit_log :error (" Unable to save message store recovery terms"
1015
+ " for directory ~p~n Error: ~p~n " ,
1016
+ [Dir , RTErr ])
1017
+ end ,
1004
1018
State3 # msstate { index_state = undefined ,
1005
1019
current_file_handle = undefined }.
1006
1020
@@ -1582,7 +1596,7 @@ read_recovery_terms(Dir) ->
1582
1596
end .
1583
1597
1584
1598
store_file_summary (Tid , Dir ) ->
1585
- ok = ets :tab2file (Tid , filename :join (Dir , ? FILE_SUMMARY_FILENAME ),
1599
+ ets :tab2file (Tid , filename :join (Dir , ? FILE_SUMMARY_FILENAME ),
1586
1600
[{extended_info , [object_count ]}]).
1587
1601
1588
1602
recover_file_summary (false , _Dir ) ->
0 commit comments