Browse Source

H2O: Update the base image to Ubuntu 20.04 (#5651)

Also do a couple of minor clean-ups.
Anton Kirilov 5 years ago
parent
commit
6b7fbb1d0e

+ 1 - 1
frameworks/C/h2o/README.md

@@ -8,7 +8,7 @@ This is a framework implementation using the [H2O](https://h2o.examp1e.net) HTTP
 
 ## Performance tuning
 
-If the test environment changes, it will probably be necessary to tune some of the framework settings in order to achieve the best performance possible. The most significant parameter is the maximum number of database connections per thread, which is controlled by the `DB_CONN` variable in the `start-servers.sh` script.
+If the test environment changes, it will probably be necessary to tune some of the framework settings in order to achieve the best performance possible. The most significant parameter is the maximum number of database connections per thread, which is controlled by the `DB_CONN` variable in the `h2o.sh` script.
 
 ## Performance issues
 

+ 10 - 9
frameworks/C/h2o/h2o.dockerfile

@@ -1,18 +1,19 @@
-FROM ubuntu:19.10
+FROM ubuntu:20.04
 
 WORKDIR /h2o_app_src
 COPY ./ ./
 
+ENV DEBIAN_FRONTEND noninteractive
 RUN apt-get update && \
-    apt-get install -yqq autoconf bison cmake curl file flex g++ git libnuma-dev libpq-dev libssl-dev \
-                     libtool libyajl-dev libz-dev make wget
+    apt-get install -yqq autoconf bison cmake curl file flex g++ git libnuma-dev libpq-dev \
+                         libssl-dev libtool libyajl-dev libz-dev make wget
 
 ### Install mustache-c
 
-ENV MUSTACHE_C_REVISION=c1948c599edfe48c6099ed70ab1d5911d8c3ddc8
+ARG MUSTACHE_C_REVISION=c1948c599edfe48c6099ed70ab1d5911d8c3ddc8
 
-ENV MUSTACHE_C_BUILD_DIR=mustache-c-build
-ENV MUSTACHE_C_PREFIX=/opt/mustache-c
+ARG MUSTACHE_C_BUILD_DIR=mustache-c-build
+ENV MUSTACHE_C_PREFIX /opt/mustache-c
 
 RUN mkdir -p "$MUSTACHE_C_BUILD_DIR" && \
     cd "$MUSTACHE_C_BUILD_DIR" && \
@@ -25,10 +26,10 @@ RUN mkdir -p "$MUSTACHE_C_BUILD_DIR" && \
 
 ### Install h2o
 
-ENV H2O_VERSION=v2.2.6
+ARG H2O_VERSION=v2.2.6
 
-ENV H2O_BUILD_DIR=h2o-build
-ENV H2O_PREFIX=/opt/h2o
+ARG H2O_BUILD_DIR=h2o-build
+ENV H2O_PREFIX /opt/h2o
 
 RUN mkdir -p "${H2O_BUILD_DIR}/build" && \
     cd "$H2O_BUILD_DIR" && \

+ 2 - 0
frameworks/C/h2o/src/handlers/world.c

@@ -51,6 +51,8 @@
 #define QUERIES_PARAMETER "queries="
 #define RANDOM_NUM_KEY "randomNumber"
 
+// MAX_UPDATE_QUERY_LEN must be updated whenever UPDATE_QUERY_BEGIN, UPDATE_QUERY_ELEM,
+// and UPDATE_QUERY_END are changed.
 #define UPDATE_QUERY_BEGIN \
 	"UPDATE " WORLD_TABLE_NAME " SET randomNumber = v.randomNumber " \
 	"FROM (VALUES(%" PRIu32 ", %" PRIu32 ")"