factor out metadata db config extractor to make it more pluggable ;
TOOD: remove extra logging from shard_id field append method