sapling/filenodes
Stanislau Hlebik 5dbdffdfe7 mononoke: fix sharded filenodes
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
2019-01-17 02:33:35 -08:00
..
if mononoke: memcache for filenodes 2018-10-25 02:08:53 -07:00
sqlfilenodes mononoke: fix sharded filenodes 2019-01-17 02:33:35 -08:00
src mononoke: move RepositoryId into mononoke-types 2018-12-19 10:24:27 -08:00
Cargo.toml Use Abomonation and cachelib to replace Asyncmemo 2018-08-07 13:37:09 -07:00