Commit Graph

198 Commits

Author SHA1 Message Date
Ken Stevens 6451b9691e review feedback 2019-10-03 13:53:54 -04:00
Ken Stevens 66618ec6bd review feedback 2019-10-03 13:52:54 -04:00
Ken Stevens 5b05e9cda0 review feedback 2019-10-03 13:49:13 -04:00
Ken Stevens 53f949c2d0 pre-review cleanup 2019-10-02 08:36:54 -04:00
Ken Stevens ba37ce0588 test cleanup 2019-10-02 07:31:16 -04:00
Ken Stevens 82543c01d6 fix test 2019-10-02 06:55:27 -04:00
Ken Stevens 5aa4f88da3 Remove ISubscribableChannel interface. We don't need it after all. 2019-10-02 06:35:39 -04:00
Ken Stevens 4c534a8d7e await cleanup 2019-10-01 22:10:07 -04:00
Ken Stevens 028febfe45 await cleanup 2019-10-01 21:16:06 -04:00
Ken Stevens f0b2bb8309 fixed triggering subscriptions 2019-10-01 14:57:25 -04:00
Ken Stevens 718b2c793d fixed asymmetry between add and remove 2019-10-01 11:22:09 -04:00
Ken Stevens ca95791d2e fix test 2019-10-01 10:52:00 -04:00
Ken Stevens 082dff71c2 added tests 2019-09-30 21:07:37 -04:00
Ken Stevens b757d95d64 added tests 2019-09-30 21:04:29 -04:00
Ken Stevens 4c8e330669 change channel cache to us id instead of object 2019-09-30 17:50:12 -04:00
Ken Stevens 6867a57625 null check 2019-09-30 17:15:35 -04:00
Ken Stevens 6196f528d9 fix synchronization channel removal 2019-09-30 16:48:48 -04:00
Ken Stevens 99fee443fd test 2019-09-30 15:19:01 -04:00
Ken Stevens fd8b5206e7 Separated ChannelRegistry from ActiveSubscriptionRegistry so we can support a many-to-one relationship there
All tests pass
2019-09-30 15:01:47 -04:00
Ken Stevens 392d7ab000 Extend SubscribableChannel with SubscribableChannelManagement so we can get a handler count so we know when to destroy a channel 2019-09-26 15:46:40 -04:00
Ken Stevens a3a7174c63 Merge remote-tracking branch 'remotes/origin/master' into ks-subscription-delivery-queue-configurable-name 2019-09-26 09:17:53 -04:00
James Agnew 8657afb01e
Fix intermittent test failures regarding search (#1509)
* Add some logging

* Add more test logging

* Work on some test logging

* Fix compile error

* Work on codecov

* Work on codecov

* Remove test debug messages
2019-09-25 20:15:21 -04:00
Ken Stevens 2c21d72c03 added queue naming service 2019-09-25 16:45:50 -04:00
jamesagnew 473fa3456e Work on adding codecov 2019-09-25 14:12:42 -04:00
James Agnew 4a751cbfc5
Integrate Bulk Export (#1487)
* Start working on subscription processor

* Work on new scheduler

* Test fixes

* Scheduler refactoring

* Fix test failure

* One more test fix

* Updates to scheduler

* More scheduler work

* Tests now all passing

* Ongoing work on export

* Ongoing scheduler work

* Ongoing testing

* Work on export task

* Sync master

* Ongoing work

* Bump xml patch version

* Work on provider

* Work on bulk

* Work on export scheduler

* More test fies

* More test fixes

* Compile fix

* Reduce logging

* Improve logging

* Reuse bulk export jobs

* Export provider

* Improve logging in bulk export

* Work on bulk export service

* One more bugfix

* Ongoing work on Bulk Data

* Add changelog
2019-09-17 16:01:35 -04:00
Ken Stevens 42a9672cc2 fix test 2019-09-09 17:36:57 -04:00
Ken Stevens fa62ab9c9e Merge remote-tracking branch 'remotes/origin/master' into ja_20190822_1440_infinispan_query_cache
# Conflicts:
#	hapi-fhir-jpaserver-migrate/src/main/java/ca/uhn/fhir/jpa/migrate/tasks/HapiFhirJpaMigrationTasks.java
#	src/changes/changes.xml
2019-09-04 13:31:00 -04:00
Ken Stevens 9ea937d007 extra logging around send to subscription delivery channel 2019-09-01 18:43:32 -04:00
jamesagnew ab5333f370 Fix subscription config file 2019-08-17 16:15:55 -04:00
James Agnew 1e07fcd2b3
Fix an unintended regression in #1357 (#1429)
* Start working on a tweak to #1357 - Not yet complete

* Tweaks to avoid an unintended regression from #1357
2019-08-15 08:35:50 -04:00
Sean McIlvenna 6ecaa4fc18 Addressing james' request to change isXml to theXml 2019-08-14 14:35:18 -04:00
Sean McIlvenna b37c4b5ae7 Fixing broken unit tests 2019-08-14 14:35:18 -04:00
Sean McIlvenna d92be90789 Changes to subscriptions to include the resource that triggered the subscription in the payload, serialized as JSON or XML depending on the Subscription.channel.payload property's value 2019-08-14 14:35:18 -04:00
jamesagnew e1b43d811f Version bump to 4.1.0-SNAPSHOT 2019-08-14 14:06:06 -04:00
jamesagnew 3f22456b0f Bump version to 4.0.0 2019-08-14 11:06:26 -04:00
jamesagnew 2999a292e6 Get subscriptions working for R5 2019-08-11 18:32:47 -04:00
James Agnew 7d62064dc0 Don't require a daoregistry 2019-08-11 08:25:41 -04:00
James Agnew 4f5a2b3c0c Add fhirType() to IBase to bring it in line with what the core structures do 2019-08-09 09:44:20 -04:00
James Agnew 8d2b0ea1c3 Test fix 2019-08-08 15:50:28 -04:00
James Agnew 2518d4e0be Add some tests 2019-08-08 15:23:55 -04:00
James Agnew 55c0d5b604
Add binary storage for Attachments (#1386)
* Have this working now

* Add utility method

* Build fixes

* Add changelog
2019-07-17 18:31:17 -04:00
James Agnew 120b93f204
Use HL7 FHIR Core Structures (#1382)
* Ongoing work on core structures suport

* Ongoing work on this merge

* Ongoing work to clean up structures

* Credit for #1179

* Address compile issues

* Latest changes

* Work on parallel execution

* Work on getting tests passing

* Add H2 to migrator

* Test fix
2019-07-14 10:16:40 -04:00
jamesagnew dff2fdd3cf GET RID OF TRAILING LICENSE HEADER SPACES ONCE AND FOR ALL
YESSSSSSSSSSSSS
2019-07-05 11:19:51 -04:00
Ken Stevens 2b1ed16f68 Apply the same fix we used for Dstu3 2019-07-04 13:58:20 -04:00
James Agnew 1fd99dac63
Enable optional cascading deletes on JPA server (#1363)
* Start working on cascading deleets

* WOrk on cascading deletes

* Work on cascading deletes

* Enable cascading deletes

* Cascade deletes almost working

* FIx test

* Test fix
2019-06-28 17:32:39 -04:00
James Agnew 2bfbea4e6b Remove duplicate test class 2019-06-26 09:24:36 -04:00
James Agnew 4ad1808da3
Propagate RequestDetails to everything in JPA server (#1358) 2019-06-22 15:18:06 -05:00
jamesagnew 087c53286c License header updates 2019-06-14 18:43:55 -04:00
Stig Rohde Døssing b56f59542a Move JettyUtil to new module 2019-06-14 18:34:45 -04:00
Stig Rohde Døssing aab7bb6b64 Issue-1325: Let OS assign random ports to servers during testing, and let tests get the port of the running server once the OS has assigned a port. Delete PortUtil and similar utilities. 2019-06-14 18:34:45 -04:00
Ken Stevens 2bf680509b
DeleteConflict hook, SearchableHashMapResourceProvider, and in-memory searching (#1341)
* Make IBundle list interface more flexible

* Make matchResourceLinks visible

* Make matchResourceLinks visible

* Pull in-memory matching functionality out of subscription module into dedicated classes in searchparam module

* Added more accessors to version independent resource classes

* improved forcedid matching (needs to be verified by James)
filter out nulls from HashMapProvider.searchAll() (hopefully no tests depend on this)

* add AnyComposition

* cleanup of Any classes

* create searchparam config so people can use that module without using subscriptions

* create searchparam config so people can use that module without using subscriptions

* fix broken test

* added derivedFrom

* renamed daoRegistry.getResourceDaoIfExists to getResourceDaoOrNull
also added method to add a new dao to the registry and retrieve registered types

* TokenParam.equals

* add error check to searchable hashmap resource provider

* added support for R4

* add successor to measure

* delete conflict hook
start with failing test

* test passes.
hook is called.

* added delete conflict hook
all delete conflict tests pass

* added javadoc

* Performance test

* test bad interceptor case

* typo

* rename criteria matcher

* added support for multiple topics

* fix method name

* add effective period

* Temporarily excluding StressTest from build to try to get Travis under time limit

* change log

* review feedback

* review feedback

* review feedback
2019-06-13 13:59:51 -04:00
Stig Døssing f032916776 Issue-1337: Fix unstable concurrent code in PointcutLatch, fix subscription tests getting latch exceptions due to missing expectations, make hapi-fhir-jpaserver-subscription tests load StructureDefinitions outside latch timers, as this can be slow on busy machines (#1338) 2019-06-10 11:05:05 -04:00
Ken Stevens f278fcf175 No longer remove channels when their subscriptions are unregistered 2019-06-03 17:37:02 -04:00
James Agnew 50a8c66bf5 Version bump to 4.0.0-SNAPSHOT 2019-05-30 17:13:03 -04:00
jamesagnew 73aa53be8f Release 3.8.0 2019-05-30 16:50:04 -04:00
Ken Stevens 9b44b37df8 removed unneccessary annotation 2019-05-09 14:43:00 -04:00
Ken Stevens 130e879d04
Delete performance (#1286)
* move expunge out

* move to prototype

* turns parameters into fields

* cleanup control flow

* moved transactions outside of loops

* add expungeeverything

* moved daos out

* add expungeThreadCount

* add expungeBatchSize

* added partition runner to run in separate threads

* all done.  just need to consolidate test code.

* Moar tests

* consolidated pointcutlatch into hapi-fhir-jpaserver-model

* final cleanup

* update javadoc

* change log

* failing test

* added delete
also @Transactional

* remove unused parameter

* fix compile

* race condition

(cherry picked from commit e1940d2fb20838859a205f2b96c833b0ce9f05eb)

# Conflicts:
#	hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/expunge/PartitionRunnerTest.java

* ja feedback

* ja feedback
2019-04-25 15:38:37 -04:00
jamesagnew abd53c0cbe License header updates 2019-04-24 21:20:11 -04:00
James Agnew 738c2c1797
Interceptor framework refactoring (#1287)
Interceptor framework overhaul
2019-04-24 14:32:30 -04:00
Ken Stevens a57e50317d
Websocket cleanup (#1275)
* fix bug in websocket subscription (It wasn't destroying the channel when there are no subscribers)

* add support for removing channel.  Also synchronize removal (there was a race condition between sync and queue)

* keep deprecated method for backwards compatibility

* make websocket endpoint configurable

* make websocket context path configurable

* make websocket context path configurable

* trying mvn clean test instead of mvn clean install to see if the build goes faster

* that didn't work at all.  reverting.

* change log
2019-04-17 15:03:35 -04:00
jamesagnew a9cfce3615 Header updates 2019-04-15 12:31:11 -04:00
Ken Stevens bb98ded1fa
Websocket improvements (#1272)
* subscription loader now only pulls active subscriptions
only allow websocket connections to subscriptions of type websocket

* Added a "flag for deletion" to ActiveSubscription in the SubscriptionRegistry to handle the race condition of a scheduled sync overlapping with a subscription creation.  We could have used a package-scoped semaphore or a pre-remove FHIR read, but this seemed like the safest, simplest and most performant way to handle it.

* ActiveSubscriptionCacheTest

* WebsocketConnectionValidatorTest

* fix compile error in jpa example
2019-04-12 08:36:49 -04:00
James Agnew 7359b77d99 Address review comments 2019-04-02 09:33:01 -04:00
jamesagnew 8791ed5793 Test tweaks 2019-03-29 17:13:41 -04:00
Ken Stevens b1d41a8211 named interceptor registries 2019-03-29 14:29:36 -04:00
Ken Stevens 9a54d7086e Fix a couple of bugs (#1251)
* might keep this

* might keep this

* undoing start in interface

* fixed bug that only supported resources with ResourceType/id prefixes

* added standalone subscription support for Dstu2.  untested.

* failing test

* fixed cannonicalsubscription.equals for email

* final cleanup
2019-03-26 10:39:40 +01:00
James Agnew d1667487c2 Clean up unique composite search params 2019-03-21 21:57:38 +01:00
James Agnew 08c7afb804 Reduce logging in JPA server 2019-03-14 17:42:13 -04:00
Ken Stevens be4863133e
Pointcut parameters and Retrier log (#1236)
* Fixed a pointcut parameter list and log an exception that was being swallowed by Retrier

* Documentation clarification
2019-03-11 17:31:03 -04:00
Ken Stevens 94021989b0 add helper method to CanonicalSubscription (#1226) 2019-03-08 09:51:42 -05:00
Ken Stevens a2d4c93922 Subscription matcher transactions (#1229)
* fix bug in ResourceIndexSearchParamQuantity
Move transaction boundary around SubscriptionMatcherInterceptor so it can be overridden in subclass
Lots of CRLF changes from a mvn -P DIST

* FIXME
2019-03-06 16:12:04 -05:00
James Agnew 9bc0f6784d
Search paging timeout with 1500 < n < 2000 results (#1221)
* Avoid paging links when offset is artificially set very high

* Ongoing fixes

* Adding logging and clean up transaction processing

* Add changelog

* More work on queries

* Keep working on getting tests passing

* More test fixes

* More work on tests

* More test works

* One more test attempt

* Ongoing fixes

* One more change

* FIxes to search algorithm

* Add changelog

* Clean up for review

* Fixed NPE in token matcher when system is not null and value is null

* test opposite (null system not null value)

* added null protection to all matchers

* Address review comments

* Address broken test

* Trying to resolve DB ordering issues
2019-03-06 05:45:05 -05:00
James Agnew 48c10bddc5
Narrative Generator refactoring (#1219)
* Starting work on this

* Working on narrative templates

* Work on new narrative system

* Account for some failing tests due to refactoring of narrative mode

* Another test fix

* More test fixes

* One more test fix

* Work on searches

* Address review comments
2019-02-27 14:59:57 -05:00
James Agnew 72c4726328 Tweaks to the way that subscriptions are serialized 2019-02-17 19:17:51 -05:00
Ken Stevens 3af0bc7206 changes needed to support different number of consumers in matching vs delivery 2019-02-17 15:23:01 -05:00
James Agnew 14e04085ae Try for a test fix and a bit of cleanup 2019-02-16 16:11:33 -05:00
James Agnew c6fcb4fcbf Allow canonical subscription to hold multiple extensions with the same
URL
2019-02-16 15:28:39 -05:00
Ken Stevens badbde7e4a SubscriptionRegistry re-uses channel and handlers if channel type didn't change when subscription is updated 2019-02-14 19:38:31 -05:00
Ken Stevens 435f57335d sonar 2019-02-13 20:50:04 -05:00
Ken Stevens 455761f9b3 fix npe 2019-02-13 16:54:38 -05:00
Ken Stevens 68171ba950 don't call SUBSCRIPTION_BEFORE_PERSISTED_RESOURCE_CHECKED and SUBSCRIPTION_AFTER_PERSISTED_RESOURCE_CHECKED for DELETE operations (since we don't currently match subscriptions for DELETE operations) 2019-02-12 14:25:36 -05:00
James Agnew a5e10740c0
Merge pull request #1194 from jamesagnew/ja_more_subscription_logger
More subscription logger work
2019-02-09 11:45:25 -05:00
James Agnew 4699c51997 Address review comments 2019-02-08 17:26:34 -05:00
Ken Stevens f40614a1aa fixed bug in in-memory matching for reference id when searchparam has two components 2019-02-08 16:37:08 -05:00
James Agnew 0f8c8d18e2 Bump version to 3.8.0-SNAPSHOT 2019-02-06 20:02:28 -05:00
jamesagnew 207015c3af Version bump to 3.7.0 2019-02-05 21:36:38 -05:00
jamesagnew d4af1ee2a3 Add tests and license headers 2019-02-04 16:34:39 -05:00
James Agnew 88eb2c424e formatting 2019-02-04 13:50:47 -05:00
James Agnew 87a6c24bde More subscription logger work 2019-02-04 13:49:10 -05:00
James Agnew 447c394cac
Ja subscription debug logger (#1190)
Squashed commit adding subscription debug logger

* Work on subscription debug logger

* Add subscription logging interceptor

* Remove unneeded variables

* A bit of cleanup

* Tweak the output logs a bit

* Address review comments
2019-02-03 16:33:54 -05:00
Ken Stevens 4a49a9362e just clearing the cache doesn't shut down the channel consumers. Switching to unregisterAll 2019-02-02 19:26:20 -05:00
Ken Stevens 84db66d2e3 fixed 2019-02-02 19:07:06 -05:00
Ken Stevens 37670ac039 actually, we shouldn't be trying to match on deleted resources. Corrected assertion in test. 2019-02-02 19:00:14 -05:00
Ken Stevens 4106d67eb7 ready for review 2019-02-02 18:03:09 -05:00
Ken Stevens dd0b56142d found another bug in standalone subscriptions 2019-02-02 17:14:05 -05:00
Ken Stevens 6616fbc9bb added CannonicalSubscription.toString() 2019-02-02 13:15:07 -05:00
Ken Stevens 9280cde491
Subscription only registers active (#1189)
* Fixed a bug in standalone subscription subscriber:  It was adding REQUESTED subscriptions to the active subscription registry.  (Only ACTIVE subscriptions should be added.)
2019-02-01 10:14:46 -05:00
jamesagnew 503d1d8aff Subscription NPE fix 2019-01-26 18:42:01 -05:00
Ken Stevens 10c59fceeb
Subscription strategy tag (#1178)
tests pass
2019-01-25 13:01:04 -05:00
James Agnew f55be0b6d0 Test fix 2019-01-25 10:56:17 -05:00