Commit Graph

13 Commits

Author SHA1 Message Date
Nick Terrell
24a12572b9 Update to zstd-1.4.x
Summary:
* Update to zstd-1.4.x
* Update to the latest zstd-rs

Reviewed By: Cyan4973

Differential Revision: D15040909

fbshipit-source-id: 938904d95ab8b1108d750d83602ee9c11c2c87b5
2019-05-21 12:25:18 -07:00
Andrey Malevich
0c8edd40f5 Revert D13575719: [tp2] Update zstd to 1.3.8 as 1.3.x
Differential Revision:
D13575719

Original commit changeset: eb7961078ad1

fbshipit-source-id: 844414e83f8a05df89a21dc1c2a6b9e60bad5dcc
2019-01-23 18:18:55 -08:00
Nick Terrell
422784684e Update zstd to 1.3.8 as 1.3.x
Summary: Update zstd in TP2 to zstd-1.3.8.

Reviewed By: pixelb

Differential Revision: D13575719

fbshipit-source-id: eb7961078ad161eb633b08b7e80e87f1c63ccca5
2019-01-23 11:15:45 -08:00
Lukas Piatkowski
47210da18f async-compression: re-add support for zstd decompression with warnings
Summary:
See the comment near "DecompressionType::OverreadingZstd" to see what it does.

Why OverreadingZstd works for Mononoke's use case? Answer:

Because we use it in bundle2 parsing, which is already chunked by the outer Reader. This means that when we have a stream of bytes:
```
uncompressed -> compressed bundle2 -> uncompressed
```
thanks to chunking we extract the compressed part:
```
do_stuff(uncompressed)
ZstdDecoder(compressed bundle2)
do_stuff(uncompressed)
```
rather than
```
do_stuff(uncompressed)
ZstdDecoder(compressed bundle2 -> uncompressed)
```
So overreading doesn't hurt us here

Reviewed By: StanislavGlebik

Differential Revision: D9700778

fbshipit-source-id: 70dd6f405ffa00fb981791aff25c60f60831ea6b
2018-09-07 09:53:25 -07:00
Lukas Piatkowski
8d776f5ea2 async-compression: replace tokio_core with tokio::runtime
Reviewed By: farnz

Differential Revision: D8868236

fbshipit-source-id: 576ac8fafb1157a285dcee59e95bd086a5410d1b
2018-07-17 04:54:59 -07:00
Pulkit Goyal
fc880f518b Add Cargo.toml files to crates. (#7)
Summary:
This is a series of patches which adds Cargo.toml files to all the crates and tries to build them. There is individual patch for each crate which tells whether that crate build successfully right now using cargo or not, and if not, reason behind that.

Following are the reasons why the crates don't build:

  * failure_ext and netstring crates which are internal
  * error related to tokio_io, there might be an patched version of tokio_io internally
  * actix-web depends on httparse which uses nightly features

All the build is done using rustc version `rustc 1.27.0-dev`.
Pull Request resolved: https://github.com/facebookexperimental/mononoke/pull/7

Differential Revision: D8778746

Pulled By: jsgf

fbshipit-source-id: 927a7a20b1d5c9643869b26c0eab09e90048443e
2018-07-09 19:52:27 -07:00
Lukas Piatkowski
5185252a8b mercurial_bundles: make Bundle2Stream sendable across threads
Reviewed By: farnz

Differential Revision: D6612214

fbshipit-source-id: 4dc672f2f1f31c516e4e2c7c58de5cbade61db61
2018-01-15 10:36:32 -08:00
Lukas Piatkowski
2e25098dc0 async-compression: add support for gzip format
Reviewed By: jsgf

Differential Revision: D6567611

fbshipit-source-id: 5aad3e11659c0f2cd135496f627180a1e7cce41c
2018-01-15 10:36:31 -08:00
Lukas Piatkowski
f59d6a1c8b async-compression: make sure decompression is framed and won't overread it's input
Summary:
- Added test for checking if decompressing isn't overreading it's input
  - As a result removed ZSTD decompression which is overreading input
- Changes in decompression code propagated usage of BufRead in bundle2 parsing code
  - As a result a bug in OuterDecoder was found where the buf was not consumed if the header value is "0"

Reviewed By: jsgf

Differential Revision: D6557440

fbshipit-source-id: 89a9f4c8790017c5b86d28d467e45f687d7323f6
2018-01-15 10:36:31 -08:00
Lukas Piatkowski
35e3c19f1c async-compression: remove the no-compression compressor/decompressor
Summary:
The no-compression decompressor cann't provide framing as other decompressors, so a safe approach would be not to have it at all.
I replaced occurances of no-compression with `Either` reader that seem to be a pattern present in the community (f.e. `futures::future::Either` or `itertools::Either`)

Reviewed By: jsgf

Differential Revision: D6555922

fbshipit-source-id: 998dafab8d9b2f00d058ce2f9e0aced76cf15b4e
2018-01-15 10:36:31 -08:00
Lukas Piatkowski
db7b41429f mercurial_bundle: bugfix for prematurely closing Compression AsyncRead
Summary:
When using forward/send_all on a Sink it is being flushed and closed, this means that if we call forward multiple times on a Sink it might fail if the underlying IO is already closed.
For ZSTD compression it didn't mattered, because it doesn't use the close/finish, but for other compressions it does.

Reviewed By: jsgf

Differential Revision: D6545343

fbshipit-source-id: 079d950f34716d621dd1fabda4f97d58d0e1d02d
2017-12-13 04:51:43 -08:00
Jeremy Fitzhardinge
04b05583df rust: async-compression: loosen decompressor lifetime bound
Summary:
Lifetime doesn't need to be static - it can be something smaller.
Propagate this into the bundle2 parser.

Reviewed By: farnz

Differential Revision: D6203918

fbshipit-source-id: f559b92029c975fee6e5c64d9d34ff9708364dc9
2017-11-01 18:51:21 -07:00
facebook-github-bot
2b6af6b941 Initial commit
fbshipit-source-id: f75baa4ff6aa71973f677b752d7aba582cf4927f
2017-07-27 18:00:19 -07:00