From e807eb103b874e4157dedcc0242063ee9a733022 Mon Sep 17 00:00:00 2001 From: Nabeel <50154757+nabeelmmd@users.noreply.github.com> Date: Thu, 20 Jan 2022 22:00:50 -0600 Subject: [PATCH] Reduce durability.interval_ms lower bound to 1ms (NFSE-5140) (#178) * Fix libmicrohttpd deprecation warnings (#169) Signed-off-by: Tristan Partin (cherry picked from commit b16a16c0db838750eceaede61f6e01c995f94e2b) * Reduce durability.interval_ms lower bound to 1ms (NFSE-5140). (#177) Signed-off-by: Nabeel M Mohamed <50154757+nabeelmmd@users.noreply.github.com> (cherry picked from commit 96833e175c56db1e13eb3a82648b35ca1cc9c46a) * Github workflow changes for 2.1.1 Signed-off-by: Nabeel M Mohamed <50154757+nabeelmmd@users.noreply.github.com> Co-authored-by: Tristan Partin --- .github/workflows/ci.yaml | 8 ++++---- .github/workflows/docs.yml | 2 +- .github/workflows/nightly_testing.yaml | 2 +- lib/include/hse_ikvdb/wal.h | 2 +- lib/util/src/rest_api.c | 14 +++++--------- 5 files changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 02606b199..b964a243c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -45,7 +45,7 @@ jobs: - name: Setup run: | - meson builddir -Dbuildtype=${{ matrix.buildtype }} --fatal-meson-warnings -Ddocs=disabled -Dbindings=all -Dycsb=true -Dwerror=true + meson builddir -Dbuildtype=${{ matrix.buildtype }} -Ddocs=disabled -Dbindings=all -Dycsb=true -Dwerror=true - name: Build run: | @@ -96,7 +96,7 @@ jobs: - name: Setup run: | - meson builddir -Dbuildtype=${{ matrix.buildtype }} --fatal-meson-warnings -Dpmem=enabled -Ddocs=disabled -Dbindings=all -Dycsb=true -Dwerror=true + meson builddir -Dbuildtype=${{ matrix.buildtype }} -Dpmem=enabled -Ddocs=disabled -Dbindings=all -Dycsb=true -Dwerror=true - name: Build run: | @@ -150,7 +150,7 @@ jobs: - name: Setup run: | - meson builddir -Dbuildtype=${{ matrix.buildtype }} --fatal-meson-warnings -Ddocs=disabled -Dbindings=all -Dycsb=true -Dwerror=true + meson builddir -Dbuildtype=${{ matrix.buildtype }} -Ddocs=disabled -Dbindings=all -Dycsb=true -Dwerror=true - name: Build run: | @@ -201,7 +201,7 @@ jobs: - name: Setup run: | - meson builddir -Dbuildtype=${{ matrix.buildtype }} --fatal-meson-warnings -Ddocs=disabled -Dbindings=all -Dycsb=true -Db_sanitize=address,undefined + meson builddir -Dbuildtype=${{ matrix.buildtype }} -Ddocs=disabled -Dbindings=all -Dycsb=true -Db_sanitize=address,undefined - name: Build run: | diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index efaf228a3..4940ab2bb 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -25,7 +25,7 @@ jobs: - name: Setup run: | - meson builddir --fatal-meson-warnings -Dwerror=true -Ddocs=enabled -Dtests=false -Dtools=disabled -Dbindings=none -Dcli=false -Dsamples=false -Ddb_bench=false + meson builddir -Dwerror=true -Ddocs=enabled -Dtests=false -Dtools=disabled -Dbindings=none -Dcli=false -Dsamples=false -Ddb_bench=false - name: Build run: | diff --git a/.github/workflows/nightly_testing.yaml b/.github/workflows/nightly_testing.yaml index 6ef390406..601c9fe7f 100644 --- a/.github/workflows/nightly_testing.yaml +++ b/.github/workflows/nightly_testing.yaml @@ -46,7 +46,7 @@ jobs: - name: Setup run: | - meson builddir -Dbuildtype=${{ matrix.build_type }} --fatal-meson-warnings -Dycsb=true + meson builddir -Dbuildtype=${{ matrix.build_type }} -Dycsb=true - name: Test run: | diff --git a/lib/include/hse_ikvdb/wal.h b/lib/include/hse_ikvdb/wal.h index 041cc13d6..b21f63d45 100644 --- a/lib/include/hse_ikvdb/wal.h +++ b/lib/include/hse_ikvdb/wal.h @@ -11,7 +11,7 @@ #include #include -#define HSE_WAL_DUR_MS_MIN (25) +#define HSE_WAL_DUR_MS_MIN (1) #define HSE_WAL_DUR_MS_DFLT (100) #define HSE_WAL_DUR_MS_MAX (1000) diff --git a/lib/util/src/rest_api.c b/lib/util/src/rest_api.c index ca799da78..73ade064d 100644 --- a/lib/util/src/rest_api.c +++ b/lib/util/src/rest_api.c @@ -29,19 +29,15 @@ #include #include -#include #define SESSIONS_PER_THREAD 5 #define NUM_THREADS 3 #define MAX_SESSIONS (SESSIONS_PER_THREAD * NUM_THREADS) #define WQ_THREADS 5 -#ifndef MHD_HTTP_NOT_ACCEPTABLE -#define MHD_HTTP_NOT_ACCEPTABLE MHD_HTTP_METHOD_NOT_ACCEPTABLE -#endif - -#ifndef MHD_HTTP_TOO_MANY_REQUESTS -#define MHD_HTTP_TOO_MANY_REQUESTS 429 +/* Required for building with libmicrohttpd >= 0.9.75 */ +#ifndef MHD_HTTP_UNPROCESSABLE_CONTENT +#define MHD_HTTP_UNPROCESSABLE_CONTENT MHD_HTTP_UNPROCESSABLE_ENTITY #endif #define KV_PAIR_MAX 16 @@ -795,7 +791,7 @@ webserver_response( err = string_validate(path, REST_URL_LEN_MAX); if (ev(err)) { - http_status = MHD_HTTP_UNPROCESSABLE_ENTITY; + http_status = MHD_HTTP_UNPROCESSABLE_CONTENT; goto respond; } @@ -853,7 +849,7 @@ webserver_response( MHD_get_connection_values(connection, MHD_GET_ARGUMENT_KIND, &extract_kv_pairs, session); if (ev(session->targ.iter.err)) { - http_status = MHD_HTTP_UNPROCESSABLE_ENTITY; + http_status = MHD_HTTP_UNPROCESSABLE_CONTENT; err = session->targ.iter.err; goto respond; }