summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/remove-content-md5-header' into ↵remove-md5-moreRobert Newson2023-05-066-236/+7
|\ | | | | | | remove-md5-entirely
| * WIP remove Content-MD5 header supportRobert Newson2023-05-046-236/+7
| | | | | | | | Part of a series of changes to expunge MD5 entirely.
* | s/old/legacyRobert Newson2023-05-062-3/+3
| |
* | make legacy checksums a compile-time optionRobert Newson2023-05-061-2/+14
| |
* | consolidate checksum verificationRobert Newson2023-05-061-15/+18
| |
* | s/digest/checksumRobert Newson2023-05-062-34/+34
| |
* | Use xxHash for couch_file checksumsNick Vatamaniuc2023-05-062-29/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check xxhash first, since it's faster [1], and if that fails, check the slower md5 version. Bump a stats counter to indicate if there are still any md5 checksums found during normal cluster operation. [1] Comparison of hashing a 4KB block (units are microseconds). ``` (node1@127.0.0.1)20> f(T), {T, ok} = timer:tc(fun() -> lists:foreach(fun (_) -> do_nothing_overhead end, lists:seq(1, 1000000)) end), (T/1000000.0). 0.167425 (node1@127.0.0.1)21> f(T), {T, ok} = timer:tc(fun() -> lists:foreach(fun (_) -> exxhash:xxhash128(B) end, lists:seq(1, 1000000)) end), (T/1000000). 0.770687 (node1@127.0.0.1)22> f(T), {T, ok} = timer:tc(fun() -> lists:foreach(fun (_) -> crypto:hash(md5, B) end, lists:seq(1, 1000000)) end), (T/1000000). 6.205445 ```
* | Encapsulate MD5 file checksums bits in couch_fileNick Vatamaniuc2023-05-052-4/+4
| | | | | | | | Avoid leaking checksumming details into couch_bt_engine.
* | Import xxHashNick Vatamaniuc2023-05-0516-1/+6760
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://cyan4973.github.io/xxHash/ It's a reasonable replacment for MD5 * It's fast: about the speed of memcpy [1] * Has a 128 bit variant, so its output is the same size as MD5's. * It's not cryptographic. So it won't require any replacing again in a few years. * It's a single header file. So it's easy to update and build. We need only the 128 bit variant so the NIF only implements that API call at the moment. To avoid blocking the schedulers on large inputs, the NIF will swtich to using dirty CPU schedulers if the input size is greater than 1MB. Benchmarking on an 8 year-old laptop, 1MB block can be hashed in about 40-50 microseconds. As the first use case replace MD5 in ETag generation. [1] The speedup compared to MD5: ``` > Payload = crypto:strong_rand_bytes(1024*1024*100). <<3,24,111,1,194,207,162,224,207,181,240,217,215,218,218, 205,158,34,105,37,113,104,124,155,61,3,179,30,67,...>> > timer:tc(fun() -> erlang:md5(Payload) end). {712241, <<236,134,158,103,156,236,124,91,106,251,186,60,167,244, 30,53>>} > timer:tc(fun() -> crypto:hash(md5, Payload) end). {190945, <<236,134,158,103,156,236,124,91,106,251,186,60,167,244, 30,53>>} > timer:tc(fun() -> exxhash:xxhash128(Payload) end). {9952, <<24,239,152,98,18,100,83,212,174,157,72,241,149,121,161, 122>>} ``` (First element of the tuple is time in microseconds).
* | mention flag and new dependenciesRobert Newson2023-05-052-0/+12
| |
* | Add report logging (#4483)Russell Branca2023-05-0419-29/+251
| | | | | | | | | | | | Add new report logging mechanism to log a map of key/value pairs --------- Co-authored-by: ILYA Khlopotov <iilyak@apache.org>
* | Nouveau doc fixes (#4572)Glynn Bird2023-05-041-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | * FIX NOUVEAU DOCS - MISSING PARAMETER The Nouveau docs contain guidance on how to code definsively for handling docs with missing attributes. All of the code blocks in this section are missing the first parameter which indicates the data type to be indexed by Lucene. * FIX NOUVEAU DOCS - SWAP query= for q= In some places in the Nouveau API examples, there was a `query=` parameter, when it should be `q=`.
* | CVE-2023-2626 details doc updateNick Vatamaniuc2023-05-021-5/+39
| |
* | Clarify encoding length in performance.rstRuben Laguna2023-05-021-2/+2
| | | | | | | | | | The original text said that something that takes 16 hex digits can be represented with just 4 digits (in an hypothetical base62 encoding). I believe that was a typo since 16 hex digits encode a 8-byte sequence that will require (8/3)*4 = 11 digits in base64 (without padding).
* | Merge pull request #4559 from apache/fix-ken-server-nouveauRobert Newson2023-05-021-1/+1
|\ \ | |/ | | fix ken_server:nouveau_updated
| * fix ken_server:nouveau_updatedfix-ken-server-nouveauRobert Newson2023-05-011-1/+1
|/
* Make Erlang 24 the minimum versionNick Vatamaniuc2023-04-3010-164/+23
| | | | | | | | | | | | | | | We can drop a compat nouveau_maps module. Later we can check the code and see if we can replace any maps:map/2 with maps:foreach/2 perhaps. In smoosh_persist, no need to check for file:delete/2. Later we should probably make the delete in couch_file do the same thing to avoid going through the file server. `sha_256_512_supported/0` has been true for a while but the check had been broken, the latest crypto module is `crypto:mac/3,4` so we can re-enable these tests. ML discussion: https://lists.apache.org/thread/7nxm16os8dl331034v126kb73jmb7j3x
* Merge pull request #4557 from apache/nouveau-partition-supportRobert Newson2023-04-296-7/+106
|\ | | | | finish partitioned support for nouveau
| * finish partitioned support for nouveauRobert Newson2023-04-296-7/+106
|/
* Merge pull request #4556 from apache/nouveau-remove-afterburnerRobert Newson2023-04-281-4/+0
|\ | | | | remove afterburner
| * remove afterburnerRobert Newson2023-04-281-4/+0
|/ | | | https://github.com/FasterXML/jackson-modules-base/tree/jackson-modules-base-2.13.3/blackbird#readme
* Merge pull request #4555 from apache/nouveau-race-condition-creating-indexRobert Newson2023-04-273-18/+80
|\
| * fix race condition when creating indexesRobert Newson2023-04-273-18/+80
|/
* Merge pull request #4543 from apache/jenkins-enable-nouveau-ciRobert Newson2023-04-2715-36/+280
|\ | | | | enable nouveau in CI
| * cache (immutable) maven artifactsRobert Newson2023-04-271-1/+1
| |
| * maven batch modeRobert Newson2023-04-271-3/+3
| |
| * disable kenRobert Newson2023-04-271-0/+1
| |
| * capture warn/error in entiretyRobert Newson2023-04-273-4/+10
| |
| * enhance test diagnosticsRobert Newson2023-04-271-17/+22
| |
| * mango end-to-end tests for nouveauRobert Newson2023-04-272-1/+49
| |
| * enhance out of order messageRobert Newson2023-04-272-4/+5
| |
| * Add log dumping to build-report make targetNick Vatamaniuc2023-04-271-1/+5
| |
| * OTP 23 supportRobert Newson2023-04-274-4/+125
| |
| * allow PUT to existing index if definition identicalRobert Newson2023-04-272-2/+39
| |
| * enable nouveau tests in CIRobert Newson2023-04-272-5/+26
|/
* Another flaky couch_js fixNick Vatamaniuc2023-04-261-3/+1
| | | | | | | After the previous fix, now the flakiness moved on to the next line. Remove the extra assertion to avoid it generating flaky tests. The main assertion is already checked above that we get a crash.
* Noticed the new internal error couchjs test was flakyNick Vatamaniuc2023-04-261-0/+6
| | | | | | It's designed to crash and exit but depending when it does it exactly it may generate different errors. Add a few more clauses. Hopefully we don't have to completely remove it or comment it out.
* Merge pull request #4550 from apache/mango-nouveau-depRobert Newson2023-04-261-1/+2
|\ | | | | declare dependency on nouveau
| * declare dependency on nouveauRobert Newson2023-04-261-1/+2
|/
* doc(cve): add 2023-26268 placeholder & backport release notes3.3.2.post1Jan Lehnardt2023-04-252-0/+65
|
* doc(cve): add 2023-26268 placeholderJan Lehnardt2023-04-251-0/+27
|
* Merge pull request #4541 from apache/nouveau-simplify-analyzer-factoryRobert Newson2023-04-241-39/+39
|\ | | | | simplify analyzer factory
| * simplify analyzer factoryRobert Newson2023-04-241-39/+39
|/
* Merge pull request #4540 from apache/nouveau-remove-facet-fieldRobert Newson2023-04-244-31/+13
|\ | | | | remove unused facet property
| * remove unused facet propertyRobert Newson2023-04-244-31/+13
|/ | | | (all fields are indexed for faceting)
* Merge pull request #4539 from apache/nouveau-lucene9-subdirRobert Newson2023-04-241-1/+1
|\
| * put lucene 9 indexes in subdirRobert Newson2023-04-241-1/+1
|/ | | | makes it easier for the future 9->10 migration via rebuild.
* Import nouveau (#4291)Robert Newson2023-04-22118-40/+9387
| | | Nouveau - a new (experimental) full-text indexing feature for Apache CouchDB, using Lucene 9. Requires Java 11 or higher (19 is preferred).
* fix(mango): GET invalid path under `_index` should not cause 500Gabor Pali2023-04-192-3/+7
| | | | | | | Sending GET requests targeting paths under the `/{db}/_index` endpoint, e.g. `/{db}/_index/something`, cause an internal error. Change the endpoint's behavior to gracefully return HTTP 405 "Method Not Allowed" instead to be consistent with others.
* mango: refactorGabor Pali2023-04-181-20/+23
|