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

Issue 3441 reindex query being ignored #3451

Merged
merged 9 commits into from
Mar 14, 2022

Conversation

markiantorno
Copy link
Collaborator

This fixes 3441.

public void testReindexJobLastUpdatedFilter() throws Exception {
// Given
DaoMethodOutcome T1_Patient = myReindexTestHelper.createEyeColourPatient(true);
Thread.sleep(3000);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick - Instead of sleeping for 3 seconds and using that interval to calculate T2_date and T4_date below, I'd recommend using sleepUntilTimeChanges() and grabbing the actual timestamps before and after. This reduces the pause time, and also guarantees that you don't get any weird side effects from clock inaccuracies (calling Thread.sleep(3000) can actually result in a delay that is higher or lower than that number)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I updated the code. Thanks.

@codecov
Copy link

codecov bot commented Mar 14, 2022

Codecov Report

Merging #3451 (c56dccd) into master (03b6c58) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #3451   +/-   ##
=========================================
  Coverage     83.03%   83.04%           
- Complexity    20980    20987    +7     
=========================================
  Files          1406     1406           
  Lines         75373    75384   +11     
  Branches      11236    11239    +3     
=========================================
+ Hits          62583    62599   +16     
+ Misses         8473     8469    -4     
+ Partials       4317     4316    -1     
Impacted Files Coverage Δ
.../reader/BaseReverseCronologicalBatchPidReader.java 88.31% <100.00%> (+1.94%) ⬆️
...or/TransactionConcurrencySemaphoreInterceptor.java 85.29% <0.00%> (+1.47%) ⬆️
...scription/match/deliver/email/EmailSenderImpl.java 100.00% <0.00%> (+25.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03b6c58...c56dccd. Read the comment docs.

@markiantorno markiantorno merged commit 49e19d9 into master Mar 14, 2022
@markiantorno markiantorno deleted the issue-3441-reindex-query-being-ignored branch March 14, 2022 19:18
michaelabuckley added a commit that referenced this pull request Mar 23, 2022
…-fast-path-elastic

* commit '92db526786ebeb9cde434483c5695ce8a5f4db2d':
  Skip database query when hibernate search fully satisfies search (#3478)
  Revert change to treat Canonical URLs as Locals (#3483)
  review feedback
  Convert Reindex into Batch2 Job (#3458)
  Issue 3450 there is no way to recreate freetext indexes for terminology entities (#3481)
  Issue 3450 there is no way to recreate freetext indexes for terminology entities (#3463)
  Rel 5 7 1 mergeback (#3480)
  Issue 3441 reindex query being ignored (#3451)

# Conflicts:
#	hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FulltextSearchSvcImpl.java
#	hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/builder/SearchBuilder.java
#	hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/r4/FhirResourceDaoR4SearchWithElasticSearchIT.java
#	hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTable.java
#	hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/search/ExtendedLuceneIndexData.java
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.

query being ignored during $reindex operation
3 participants