Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ writeTimeout=5000
# (write one PV at a time). With channel access (ca), parallel writes
# may trigger deadlocks in the JCA library. SYNCHRONOUS policy
# is then the workaround to consider.
restorePolicy=SYNCHRONOUS
restorePolicy=ASYNCHRONOUS
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

if [ $# -eq 0 ]; then

Check failure on line 3 in services/save-and-restore/src/main/resources/scripts/update-configuration-mapping.sh

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich.

See more on https://sonarcloud.io/project/issues?id=ControlSystemStudio_phoebus&issues=AaI8HFyiwnwsvk28RMfQ&open=AaI8HFyiwnwsvk28RMfQ&pullRequest=4049
echo "Invalid usage. Please specify path to the file configuration_mapping.json as first argument."
exit 1
fi

echo "Creating temporary index"
curl -XPUT "http://localhost:9200/saveandrestore_configuration_tmp" -H 'Content-Type: application/json' --data @$1
echo

echo "Copying data to temporary index"
curl -XPOST "http://localhost:9200/_reindex" -H 'Content-Type: application/json' -d '{"source":{"index": "saveandrestore_configuration"}, "dest":{"index":"saveandrestore_configuration_tmp"}}'
echo

echo "Flushing data to temporary index"
curl -XPOST "http://localhost:9200/saveandrestore_configuration_tmp/_flush"
echo

echo "Delete original index"
curl -XDELETE "http://localhost:9200/saveandrestore_configuration"
echo

echo "Re-creating original index"
curl -XPUT "http://localhost:9200/saveandrestore_configuration" -H 'Content-Type: application/json' --data @$1
echo

echo "Copying data to original index"
curl -XPOST "http://localhost:9200/_reindex" -H 'Content-Type: application/json' -d '{"source":{"index": "saveandrestore_configuration_tmp"}, "dest":{"index":"saveandrestore_configuration"}}'
echo

echo "Flushing data to original index"
curl -XPOST "http://localhost:9200/saveandrestore_configuration/_flush"
echo

echo "Delete temporary index"
curl -XDELETE "http://localhost:9200/saveandrestore_configuration_tmp"
echo
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"type" : "nested",
"properties": {
"name": {
"type": "text"
"type": "keyword"
},
"comment": {
"type": "text"
Expand Down
Loading