iilyak commented on a change in pull request #477: Add LRU for view groups
URL: https://github.com/apache/couchdb/pull/477#discussion_r119953639
##########
File path: src/couch_index/src/couch_index_server.erl
##########
@@ -187,18 +285,20 @@ code_change(_OldVsn, State, _Extra) ->
{ok, State}.
-handle_config_change("couchdb", "index_dir", RootDir, _, RootDir) ->
- {ok, RootDir};
-handle_config_change("couchdb", "view_index_dir", RootDir, _, RootDir) ->
- {ok, RootDir};
+handle_config_change("couchdb", "index_dir", RootDir, _,
#st{root_dir=RootDir}=State) ->
+ {ok, State};
+handle_config_change("couchdb", "view_index_dir", RootDir, _,
#st{root_dir=RootDir}=State) ->
+ {ok, State};
handle_config_change("couchdb", "index_dir", _, _, _) ->
exit(whereis(couch_index_server), config_change),
remove_handler;
handle_config_change("couchdb", "view_index_dir", _, _, _) ->
exit(whereis(couch_index_server), config_change),
remove_handler;
-handle_config_change(_, _, _, _, RootDir) ->
- {ok, RootDir}.
+handle_config_change("couchdb", "max_indices_open", Max, _, State) ->
+ {ok, State#st{max_open=list_to_integer(Max)}};
Review comment:
Two questions here:
1. Do we want to support a possibility to have unlimited number of opened
indexes?
2. How would we want it to fail if max_indices_open doesn't parse to
integer (typo has been made).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services