Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Improve cluster startup behavior as three separate commits:
Sometimes if
mem3is not initialized yet butrexicould start calling us, and so we have to handlemem3_shardsets tables not being created yet. Previously, we handled the case of missing ets tables by catchingerror:badargin places likefor_db/2, but then forgot to handle it the lower levelmaybe_spawn_shard_writer/3function, so call was still crashing and making a mess in the logs. This is more apparent on startup with nodes being upgraded in a busy cluster.Improve mem3 supervisor. There was a question there left from years back if order is important, it turns out it is. So fix the order. See the reasoning in the commit message. Also since order is important we want to use a rest_for_one supervisor not a
one_for_one.Cleanup node startup logging a bit. We were emitting duplicate logs and also at level that's a bit higher than needed.