Closed pjeli closed 5 years ago
Should this new functionality be automatically called upon restart? I feel that the answer is yes. Maybe it can be controlled via configuration? Need to think further.
This is now committed. In version 1.6.6
of NNA you can figure to auto-fetch on restart by setting "nna.bootstrap.auto.fetch.namespace" to "true" in your application.properties
file.
Today if you "stop" a long-running NNA process, there will be several ramifications:
(1) You will likely need to run
/fetchNamespace
endpoint to get a new, fresh, more up-to-date FsImage. (2) You will then, afterwards, need to run/reloadNamespace
to load in the new FsImage and play the edit logs from the JournalNodes in order to catch up fully.It should be possible to provide a start-up routine for NNA where it will automatically do all of these functions for you on start-up so that you don't need to them manually each restart.
One possibility for now is to simply provide a
/fetchAndReloadNamespace
API function that is just a merge of the two calls above. This would be significant enough. However I would like to hopefully also just make this call upon bootstrap.Need to think of what the best way to do this would be. As obviously for some restarts we would like to NOT do the fetch and reload again and again.