If the import configuration option specifies enabled as true and repair as true, we will attempt to perform an import repair. In a repair, we will attempt to extract the metadata and checkpoint information from the raw file data and reconstruct the configuration strings for the target data source.
The __wt_import method already exists in WiredTiger as a means to import a file object into a running database. It extracts the metadata and checkpoint information from the raw data file, provided the block allocation size is known, essentially performing the import repair operation described above.
As the block allocation will not be known in our case, we need to refactor the existing code to, at minimum, bypass the checksum match when reading the file.
The repair functionality should work for (simple) table and file data sources.