|
96 | 96 | -record(client_msstate,
|
97 | 97 | { server,
|
98 | 98 | client_ref,
|
99 |
| - file_handle_cache, %% Unused. |
100 | 99 | index_state,
|
101 | 100 | index_module,
|
102 | 101 | dir,
|
103 |
| - gc_pid, %% Value is set correctly but unused. |
104 | 102 | file_handles_ets,
|
105 |
| - file_summary_ets, %% Value is set correctly but unused. |
106 | 103 | cur_file_cache_ets,
|
107 | 104 | flying_ets,
|
108 | 105 | credit_disc_bound
|
|
144 | 141 | -type client_msstate() :: #client_msstate {
|
145 | 142 | server :: server(),
|
146 | 143 | client_ref :: client_ref(),
|
147 |
| - file_handle_cache :: map(), |
148 | 144 | index_state :: any(),
|
149 | 145 | index_module :: atom(),
|
150 | 146 | %% Stored as binary() as opposed to file:filename() to save memory.
|
151 | 147 | dir :: binary(),
|
152 |
| - gc_pid :: pid(), |
153 | 148 | file_handles_ets :: ets:tid(),
|
154 |
| - file_summary_ets :: ets:tid(), |
155 | 149 | cur_file_cache_ets :: ets:tid(),
|
156 | 150 | flying_ets :: ets:tid(),
|
157 | 151 | credit_disc_bound :: {pos_integer(), pos_integer()}}.
|
@@ -409,22 +403,18 @@ successfully_recovered_state(Server) ->
|
409 | 403 | -spec client_init(server(), client_ref(), maybe_msg_id_fun()) -> client_msstate().
|
410 | 404 |
|
411 | 405 | client_init(Server, Ref, MsgOnDiskFun) when is_pid(Server); is_atom(Server) ->
|
412 |
| - {IState, IModule, Dir, GCPid, |
413 |
| - FileHandlesEts, FileSummaryEts, CurFileCacheEts, FlyingEts} = |
| 406 | + {IState, IModule, Dir, FileHandlesEts, CurFileCacheEts, FlyingEts} = |
414 | 407 | gen_server2:call(
|
415 | 408 | Server, {new_client_state, Ref, self(), MsgOnDiskFun},
|
416 | 409 | infinity),
|
417 | 410 | CreditDiscBound = rabbit_misc:get_env(rabbit, msg_store_credit_disc_bound,
|
418 | 411 | ?CREDIT_DISC_BOUND),
|
419 | 412 | #client_msstate { server = Server,
|
420 | 413 | client_ref = Ref,
|
421 |
| - file_handle_cache = #{}, |
422 | 414 | index_state = IState,
|
423 | 415 | index_module = IModule,
|
424 | 416 | dir = rabbit_file:filename_to_binary(Dir),
|
425 |
| - gc_pid = GCPid, |
426 | 417 | file_handles_ets = FileHandlesEts,
|
427 |
| - file_summary_ets = FileSummaryEts, |
428 | 418 | cur_file_cache_ets = CurFileCacheEts,
|
429 | 419 | flying_ets = FlyingEts,
|
430 | 420 | credit_disc_bound = CreditDiscBound }.
|
@@ -806,14 +796,12 @@ handle_call({new_client_state, CRef, CPid, MsgOnDiskFun}, _From,
|
806 | 796 | index_state = IndexState,
|
807 | 797 | index_module = IndexModule,
|
808 | 798 | file_handles_ets = FileHandlesEts,
|
809 |
| - file_summary_ets = FileSummaryEts, |
810 | 799 | cur_file_cache_ets = CurFileCacheEts,
|
811 | 800 | flying_ets = FlyingEts,
|
812 |
| - clients = Clients, |
813 |
| - gc_pid = GCPid }) -> |
| 801 | + clients = Clients }) -> |
814 | 802 | Clients1 = maps:put(CRef, {CPid, MsgOnDiskFun}, Clients),
|
815 | 803 | erlang:monitor(process, CPid),
|
816 |
| - reply({IndexState, IndexModule, Dir, GCPid, FileHandlesEts, FileSummaryEts, |
| 804 | + reply({IndexState, IndexModule, Dir, FileHandlesEts, |
817 | 805 | CurFileCacheEts, FlyingEts},
|
818 | 806 | State #msstate { clients = Clients1 });
|
819 | 807 |
|
|
0 commit comments