STAND-127: Optimising OpenMRS Standalone 3.x Initialization by Using Pre-Initialized Demo and Empty Database and Auto-Refreshing Search Index#85
Conversation
…Pre-Initialized Demo and Empty Database and Auto-Refreshing Search Index
|
Is this also for the starter implementation without demo data? |
Yes using |
|
Do you know why i get this for the O3 standalone and yet i never got it for the platform standalone? |
Not really seems to me as a file permission failure |
|
Why on the O3 standalone but not for the platform one? Have you also noticed that the ID Generation module fails to start with this error?
|
Let me take a deep dive however let me push this to fix the file permission first ... |
oh i see according to this It seems to be an issue |
let me try to solve it manually by adjusting them in sql directly |
|
cc @dkayiwa fixed the module fails however now noticed that the module also when started adds some more load time |
|
It is taking long because it is initialising the database on the first run, just like it was before. |
But this is done on first run and takes less on second or other time |
|
When i looked at the logs, it had those things that usually happen when intializing. |
seems like the ID Generation module when solved to load increased the load time and makes the sql to initialise |
|
@Muta-Jonathan can we take advantage of this to fix the famous database error in where clause? openmrs/openmrs-core@474ce37 |
|
Oh yes let me look into it |
@dkayiwa have fixed this however should it be included in this PR for 3.x? Is it okay? |
You can create a separate pull request? |
|
Great ... What is really missing for this so i can look into it so it goes in? |
|
When i tested it, it too long because it was running those database initialisation steps which we wanted to avoid by simply dumping an already initialised database. |
|
oh let me run a new instance of sdk and deal with a newer dump and see how it behaves |
|
I did not expect to see logs like |
|
oh yes Am now trying the new sql however seems introduces a new error but am on it to roll it out Basically ScriptRunner the plugin we use to import the dump doesnot interprete the following sql lines basically this happens during |
|
cc @dkayiwa |
|
Also have updated the videos on PR |
|
Are you able to successfully run |
Oh yes it is successful |
|
This is what i get: https://pastebin.com/45Q237W7 |
Is this happening on mac? |
|
Oh seen the issue |
|
cc @dkayiwa this should work now |
|
Does this work for you? |
|
Seems the 3.5.0-SNAPSHOT is not available in the referenceapplication-distro |
|
How about this? |
|
same issue. could it be that the 3.x snapshots are not available/ published in the location |
|
How does the sdk get them? |
|
Am also wondering because am using the same version .. let me take a search in the sdk code |
|
So basically when we use however when we specify And this also happens for other versions with similar versioning in their location folders |
|
Merging this. Let us deal with that in a separate pull request. |
See https://openmrs.atlassian.net/browse/STAND-127
Description
Currently, the standalone rebuilds the full OpenMRS schema and demo content from XML on first run, which is slow and doesn't include an active Lucene search index.
This ticket proposes:
Supporting a
.sqldump from a pre-initialized SDK 3.x instance to serve as the source DB (demo/empty).Detecting the appropriate dump (
demo-db-{refapp.version}.sql or empty-db-{refapp.version}.sql) fromsrc/main/db/.Rebuilding the Lucene search index automatically at startup after importing the dump.
Updating README to guide developers on how to generate dumps using
mysqldumpfrom their SDK environments.Uses
docker composeto run the 3.x instance at build time and copy thechecksumsusingand then zip it along with the standalone zip to quicken the startup process
This speeds up load time significantly and ensures a smoother UX with patients immediately searchable after first launch.
ScreenRecord for demo db
Screencast.from.07-08-25.14.38.40.webm
ScreenRecord for Empty db
Screencast.from.07-08-25.14.42.20.webm