Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize fts-database #1268

Open
wants to merge 42 commits into
base: main
Choose a base branch
from

Conversation

Jaehwa-Noh
Copy link
Contributor

@Jaehwa-Noh Jaehwa-Noh commented Mar 11, 2024

What I have done and why
Fts Database table has hidden column which is rowId as Primary key.
So, the same entity was not replaced with old data where already in database, because of having different rowId.
Now, I add delete query to remove all data from database and replace insertAll to deteleAllAndInsertAll function.

• Delete all fts data when insert data
• Create NewsResourceFtsDaoTest
• Create TopicFtsDaoTest
• Create SearchContentsRepositoryTest
• Create Entities test data in test module.

Fixes #1267

- deleteAll.
- deleteAllAndInsertAll.

Change-Id: I1ada2b90ca57d7d96e74992840ac4310d8699b97
- whenInsertOnce_InsertedNewsResourceEntityOnce.
- whenInsertTwice_InsertedNewsResourceEntityTwice.
- whenDeleteAndInsertAllThreeTimes_InsertedOnce

Change-Id: I9aaab5ca5573a64260917d01283bbed9f4c0c6e6
Change-Id: Ic7507223d1f4d8888d3809d9cfd7272d84ad0f66
Change-Id: I6ba5157706dee6a8bc47c0792c871c45a36c41cb
Change-Id: Ie185aa1fca002a27580036bcaca4d31da0818b92
- whenInsertOnce_InsertedTopicsFtsEntityOnce
- whenInsertTwice_InsertedNewsResourceEntityTwice
- whenDeleteAndInsertAllThreeTimes_InsertedOnce

Change-Id: I7efbf465939a33b8b1451f42899284225f8647b3
Change-Id: I50a222fdcd267e57cf25065e76aa488cef66c5e1
Change-Id: Idaf471323937040def00f8664bb8e3fff0067967
Change-Id: Ie31a6fbb10ab10f7d7973b79cf6c4711257c0b9a
Change-Id: I49e514960b76a324e2a773f29ecd896c35ea22a4
- alias(libs.plugins.nowinandroid.android.room).
- androidTestImplementation(projects.core.testing).
- defaultConfig.
- testInstrumentationRunner.

Change-Id: I5e3db4da5275ef4fa5efbc1ea151dfc64d34a74f
- whenPopulateFtsDataTwice_PopulateFtsOnce
- whenSearchAndroid_ReturnResult

Change-Id: Iccb3233415b30837868f4166fd843063ed6ad5f4
Change-Id: Ie1a0d90b85e03481744dd1cad06d3a0d08eed466
Change-Id: Ia6f923d9987e823d3d3742b34eab087e32596a61
@Jaehwa-Noh Jaehwa-Noh changed the title Optimize ftsdatabase Optimize fts-database Mar 11, 2024
Jaehwa-Noh added a commit to Jaehwa-Noh/Jaehwa-Noh that referenced this pull request Mar 11, 2024
Change-Id: I5c2a6387651347bce74399d3ec857afe7e56604d
…ize-ftsdatabase

Change-Id: Ie2af772fbefb8195b3d47a60616983d63e6fcc92
Change-Id: I76da5ddf0d7dc5337b6a7b5c0558bad29d9628b8
Change-Id: I420b7eddbfd7d5b2cd03a6a52293786aacd4922b
Change-Id: Ia0d34c5ed66edfb3e6910e455529f55be3192d9c
Change-Id: I92ec805606e297f56a0b62e9aed9bab27c3850df
Change-Id: I9263f9b2b5c690a6627a3503c1d02639720c7bab
Jaehwa-Noh and others added 8 commits April 26, 2024 21:44
Change-Id: If515255916b76a29f05109a628c5964625d865fa
Change-Id: Ie3a0aebe98264db53ab63a8b9d4d665d92c835cd
Change-Id: Ic80f9b04b71cd6bf5b8f08efd62870c4f59732a3
Change-Id: I95608be389126608c20861c719cbdde9e957c70f
Change-Id: I59c5600f5aa79d638ee8983ceb754c98471ceb66
Change-Id: I06be4b51f177d0084df34f27bb334e108987b462
Change-Id: I7a15694c4bc12a9002e2a6f336d5d05ef372225b
@keyboardsurfer keyboardsurfer self-requested a review December 9, 2024 11:28
keyboardsurfer and others added 3 commits December 9, 2024 12:32
Change-Id: I6d14aa71a589780effd4dabc3789683cfb9f5e81
Change-Id: I3ac7a75070a7efc6a281bedb48c3e11bd257af90
@Jaehwa-Noh
Copy link
Contributor Author

@keyboardsurfer I merged it with latest main branch. Kindly take a look.

dturner and others added 5 commits December 19, 2024 13:45
Change-Id: Id1176c8dd741ed888e927a9238fbac7c9dc49543
- androidTestImplementation(projects.core.testing)

Change-Id: Icb626d1f6c84085aa77a0352d89dc910cd27b08e
- alias(libs.plugins.nowinandroid.android.room)

Change-Id: Ibafaadbfdf8d8c2f7e6659059a145026c483c7fc
- androidTestImplementation(libs.androidx.test.core)

Change-Id: I60d0f4150a54181f6e9ee3d2cfffc9ea56ae6e62
@Jaehwa-Noh
Copy link
Contributor Author

@dturner @keyboardsurfer This PR had been passed the CI tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Fts Database data increase infinitely
4 participants