From 463084e99e3ffd5cd24dd8bc965314a7f8aa396d Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 20 May 2020 16:48:40 +0000 Subject: [PATCH] --- .vscode/launch.json | 2 +- devdocs/todo.txt | 16 ++++------------ server/AyaNova/biz/Search.cs | 23 +++++++++++++++++++++++ 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 6b9a0d68..259171c9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -51,7 +51,7 @@ "AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles", "AYANOVA_METRICS_USE_INFLUXDB": "false", "AYANOVA_SERVER_TEST_MODE":"true", - "AYANOVA_SERVER_TEST_MODE_SEEDLEVEL":"small", + "AYANOVA_SERVER_TEST_MODE_SEEDLEVEL":"huge", "AYANOVA_SERVER_TEST_MODE_TZ_OFFSET":"-7", "AYANOVA_BACKUP_PG_DUMP_PATH":"C:\\data\\code\\PostgreSQLPortable_12.0\\App\\PgSQL\\bin\\" diff --git a/devdocs/todo.txt b/devdocs/todo.txt index 425ed407..141d302a 100644 --- a/devdocs/todo.txt +++ b/devdocs/todo.txt @@ -6,19 +6,7 @@ } -working on: BACKUP finish routes. - Add integration tests as much as possible - maybe need whole other category of integration tests for ops that can be run seprately? - Then test with actual attachments to ensure it's working for that part as well - Upload backup file so can restore? - only works if we have automated restore which is doubtful at any point -todo: OPS routes (SERVER AND CLIENT) - - Backup, restore https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/3369 - - These need to be done fairly early on in order to have shit to play with for testing etc - -todo: Test backup on Linux - - going to need to run in vm I think maybe todo: Search indexing performance improvement and exception avoidance (Search.cs 828) ON CONFLICT IDEA @@ -60,3 +48,7 @@ todo: onboarding and default manager account password - see what other programs do, like our forum software todo: API docs, make separate page for datalists and remove from api-response-format.md doc but put a reference link to it there. +DEPLOY AND TEST + +todo: Test backup on Linux + - going to need to run in vm I think maybe \ No newline at end of file diff --git a/server/AyaNova/biz/Search.cs b/server/AyaNova/biz/Search.cs index 2bc1327a..7f4b9738 100644 --- a/server/AyaNova/biz/Search.cs +++ b/server/AyaNova/biz/Search.cs @@ -827,6 +827,29 @@ ON CONFLICT IDEA { if (!ExistingKeywordMatches.ContainsValue(KeyWord)) { + + + +/* +NEW IDEA +todo: Search indexing performance improvement and exception avoidance (Search.cs 828) + ON CONFLICT IDEA + https://www.postgresql.org/docs/current/sql-insert.html#SQL-ON-CONFLICT + Idea: do the insert manually with the clause "on conflict do nothing" + if detect it hasn't inserted (conflict) trigger a fetch instead + like what is being done now but won't have the exception to deal with!! + +ON CONFLICT IDEA + https://www.postgresql.org/docs/current/sql-insert.html#SQL-ON-CONFLICT + Idea: do the insert manually with the clause "on conflict do nothing" + if detect it hasn't inserted (conflict) trigger a fetch instead + like what is being done now but won't have the exception to deal with!! + + + //NEED TO BASELINE THIS SHIT +*/ + + //algorithm: Attempt to add it to the db and get the id, if it fails with the expected exception for a duplicate word insertion attempt, then immediately read back that word and handle it //ATTEMPT TO ADD THE WORD TO THE SEARCHDICTIONARY