mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
5dbdffdfe7
Summary: Previously to get copy/move source we had to join `paths` and `fixedcopyinfo` table. That worked fine when we had just one shard. However now we have many shards, and join no longer works. The reason is that move source path is in a different shard compared to move destination path, and join returns no data. Consider this situation. shardA contains all the data for pathA, shardB contains all the data for pathB. That means that sharded `paths` table will have pathA in shardA and pathB in shardB. Then if file pathA was copied form pathB, then `fixedcopyinfo` table in shardA contains a path_hash of pathB. However joining shardA's `fixedcopyinfo` with shardA's `paths` to convert path_hash to path fails because pathB is in shardB. The only possible fix is to split fetching path_hash from `fixedcopyinfo` and converting path_hash to path. I don't think we'll be able to keep the logic with join that we have at the moment. It would require us to have all paths on all shards which is unfeasible because it'll make writes much slower. Reviewed By: aslpavel Differential Revision: D13690141 fbshipit-source-id: 16b5cae6f23c162bb502b65c208f3ca9e443fb04 |
||
---|---|---|
.. | ||
if | ||
sqlfilenodes | ||
src | ||
Cargo.toml |