Skip to content

Commit

Permalink
Merge pull request #27 from atlassian/hotfix/release-1.0.6-beta
Browse files Browse the repository at this point in the history
Hotfix: populate db correct collate, fix index-sync scipt, update use…
  • Loading branch information
ometelytsia committed Oct 21, 2019
2 parents ebe8ba8 + bd6c89c commit 4e0100a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
4 changes: 4 additions & 0 deletions jira/dc-apps-performance-toolkit-user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,10 @@ For more information, go to [Re-indexing Jira](https://confluence.atlassian.com/

Jira will be unavailable for some time during the re-indexing process. When finished, the **Acknowledge** button will be available on the re-indexing page.

{{% note %}}
Go to **![cog icon](/platform/marketplace/images/cog.png) > System > General configuration**, click **Edit Settings** and set **Base ULR** to **LoadBalancerURL** value.
{{% /note %}}

## Testing scenarios

Using the Data Center App Performance Toolkit for [Performance and scale testing your Data Center app](/platform/marketplace/developing-apps-for-atlassian-data-center-products/) involves two test scenarios:
Expand Down
23 changes: 13 additions & 10 deletions jira/util/index-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,37 @@ SEARCH_LOG="/var/atlassian/application-data/jira/log/atlassian-jira.log"
TIMEOUT=300

if sudo -u jira test -f $SEARCH_LOG; then
echo "Found $SEARCH_LOG"
echo "Log file: $SEARCH_LOG"
else
echo "File $SEARCH_LOG does not exist"
exit 1
fi

function find_word_in_log() {
let COUNTER=0
let SLEEP_TIME=2
TOTAL_COUNT=$((TIMEOUT / SLEEP_TIME))
while [ $COUNTER -lt $TOTAL_COUNT ];do
check_grep=`sudo su jira -c "cat $SEARCH_LOG" | grep "$1" | awk '{print substr(\$0, index(\$0,\$6)) }' 2>&1`
COUNTER=0
SLEEP_TIME=2
ATTEMPTS=$((TIMEOUT / SLEEP_TIME))
while [ ${COUNTER} -lt ${ATTEMPTS} ];do
check_grep=`sudo su jira -c "cat $SEARCH_LOG" | grep -o "$1"`
if [ -z "$check_grep" ];then
for i in {1..$COUNTER}; do echo -n .; done
sleep $SLEEP_TIME
sleep ${SLEEP_TIME}
let COUNTER=$COUNTER+1
else
echo "$check_grep"
break
fi

done
echo "Failed to find $1 in $SEARCH_LOG in $TIMEOUT seconds"
exit 1
if [ ${COUNTER} -eq ${ATTEMPTS} ]; then
echo # move to a new line
echo "Failed to find $1 in $SEARCH_LOG in $TIMEOUT seconds"
exit 1
fi
}

find_word_in_log "Index restore started"
find_word_in_log "indexes - 60%"
find_word_in_log "indexes - 80%"
find_word_in_log "indexes - 100%"
find_word_in_log "Index restore complete"
find_word_in_log "Index restore complete"
2 changes: 1 addition & 1 deletion jira/util/populate_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ echo "Drop DB"
PGPASSWORD=${JIRA_DB_PASS} dropdb -U ${JIRA_DB_USER} -h ${DB_HOST} ${JIRA_DB_NAME}
sleep 5
echo "Create DB"
PGPASSWORD=${JIRA_DB_PASS} createdb -U ${JIRA_DB_USER} -h ${DB_HOST} -T template0 ${JIRA_DB_NAME}
PGPASSWORD=${JIRA_DB_PASS} createdb -U ${JIRA_DB_USER} -h ${DB_HOST} -T template0 -E "UNICODE" -l "C" ${JIRA_DB_NAME}
sleep 5
echo "PG Restore"
time PGPASSWORD=${JIRA_DB_PASS} pg_restore -v -U ${JIRA_DB_USER} -h ${DB_HOST} -d ${JIRA_DB_NAME} ${DB_DUMP_NAME}
Expand Down

0 comments on commit 4e0100a

Please sign in to comment.