You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added new SQL storage indexer to store all the package information in a
SQL database (currently SQLite) instead of memory. The Indexer interface
has been updated to include a Close method, so database connections can
be closed at the end. This new indexer makes use of two databases so
updates can be performed faster. Updating the unused and empty database
before doing the actual swap in the service.
Moreover, it has been added a cache LRU for the search endpoint.
Search responses are one of the most expensive requests for the EPR
service, specially when there are several packages in the response. Even
if there is a CDN in front of the service, this could help to improve
performance.
During this process, code that was private in public modules has been
moved to internal modules too.
---------
Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
echo -e "\t-p <epr_address>: Address of the package registry service. Default: localhost:8080"
17
17
echo -e "\t-e <emulator_address>: Address of the emulator host (fake GCS server). Default: localhost:4443"
18
18
echo -e "\t-i <index_path>: Path to the search index JSON. Default: \"\""
19
19
echo -e "\t\t\tIf set, the bucket name will be ignored (-b parameter) and Package Registry will use its default development bucket gs://fake-package-storage-internal"
20
20
echo -e "\t-c <config_path>: Path to the configurastion file. Default: \"\""
21
+
echo -e "\t-s : Enable SQL Storage indexer. By default Storage Indexer is enabled."
22
+
echo -e "\t-C : Enable Search Cache. Just supported with SQL Storage indexer. By default Search Cache is disabled."
21
23
echo -e "\t-h: Show this message"
22
24
}
23
25
@@ -26,8 +28,10 @@ ADDRESS="localhost:8080"
26
28
INDEX_PATH=""
27
29
EMULATOR_HOST="localhost:4443"
28
30
CONFIG_PATH="${SCRIPT_DIR}/../config.yml"
31
+
ENABLE_STORAGE_SQL_INDEXER=0
32
+
ENABLE_SEARCH_CACHE=0
29
33
30
-
whilegetopts":b:p:i:e:c:h" o;do
34
+
whilegetopts":b:p:i:e:c:sCh" o;do
31
35
case"${o}"in
32
36
b)
33
37
BUCKET_NAME="${OPTARG}"
@@ -44,6 +48,12 @@ while getopts ":b:p:i:e:c:h" o; do
0 commit comments