mirror of
https://github.com/facebook/sapling.git
synced 2024-10-16 19:57:18 +03:00
9493a05e7b
Summary: This updates the store_bytes method to chunk incoming data instead of uploading it as-is. This is unfortunately a bit hacky (but so was the previous implementation), since it means we have to hash the data before it has gone through the Filestore's preparation. That said, one of the invariants of the filestore is that chunk size shouldn't affect the Content ID (and there is fairly extensive test coverage for this), so, notionally, this does work. Performance-wise, it does mean we are hashing the object twice. That actually was the case before as well anyway (since obtain the ContentId for FileContents would clone them then hash them). The upshot of this change is that large files uploaded through unbundle will actually be chunked (whereas before, they wouldn't be). Long-term, we should try and delete this method, as it is quite unsavory to begin with. But, for now, we don't really have a choice since our content upload path does rely on its existence. Reviewed By: StanislavGlebik Differential Revision: D20281937 fbshipit-source-id: 78d584b2f9eea6996dd1d4acbbadc10c9049a408 |
||
---|---|---|
.. | ||
bookmark.rs | ||
changeset.rs | ||
concurrency.rs | ||
lib.rs |