6/12 push set_db_path up to Naming_table.save
commit3979d44bb49953ecaa2b5a3f2e95a76ec6872def
authorLucian Wischik <ljw@fb.com>
Fri, 24 Apr 2020 05:39:37 +0000 (23 22:39 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 30 Apr 2020 21:16:40 +0000 (30 14:16 -0700)
treeb46711756dccf047de8cb9c4a773175c9757edaa
parentff3283fc8090b3db8408460010db99a1ea57ab4a
6/12 push set_db_path up to Naming_table.save

Summary:
This diff stack gets rid of global sharedmem state "NamingTableDatabaseSettings", which stores the path to the naming DB.

In this diff I'm just pushing the call to `set_db_path` out of Naming_sqlite.update_file_infos up to its caller.

My eventual goal is that the leaf functions shouldn't have access to or control over sharedmem state. They should be pure functions which only give answers based on their input parameters. That's why it's bad that a leaf function like `Naming_sqlite.update_file_infos` should modify global state.

Reviewed By: arxanas

Differential Revision: D21192120

fbshipit-source-id: ed726f251cab61c992dff617c544476283305763
hphp/hack/src/naming/naming_sqlite.ml
hphp/hack/src/naming/naming_table.ml