Add a new file ingestion option `link_files`
Summary: Add option IngestExternalFileOptions::link_files that hard links input files and preserves original file links after ingestion, unlike move_files which will unlink input files after ingestion. This can be useful when being used together with allow_db_generated_files to ingest files from another DB. Also reverted the change to move_files in #12959 to simplify the contract so that it will always unlink input files without exception.
Test plan: updated unit test ExternSSTFileLinkFailFallbackTest.LinkFailFallBackExternalSst to test that input files will not be unlinked.
@cbi42 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@cbi42 merged this pull request in facebook/rocksdb@cd6f802ccb2f6f64263ba4b61134e3072d03a867.