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

Adding DDL trigger to speedup framework start #901

Merged
merged 17 commits into from Jun 10, 2019

Conversation

Projects
None yet
2 participants
@jgebal
Copy link
Member

commented Apr 11, 2019

This PR adds support for DDL trigger to build annotation cache.
The approach is resolving huge schema scanning issues.
With this, users have option to install with or without DDL trigger enabled.
Without trigger, each time tests are run, framework needs to check cache validity. This can take quite some time on huge database schema.
With trigger enabled, no source code scanning is needed. Cache is maintained by DDL statements themselves.
Resolves #631

@jgebal jgebal requested review from lwasylow and Pazus Apr 11, 2019

@jgebal jgebal added this to the v3.1.7 milestone Apr 11, 2019

@@ -121,6 +121,8 @@ The uninstall process will **not** drop profiler tables, as they can potentially

It is up to DBA to maintain the storage of the profiler tables.

Additionally the user performing the installation must have a `ADMINISTER DATABASE TRIGGER` privilege. This is required for installation of trigger that is responsible for parsing annotations at at compile-time of a package.

This comment has been minimized.

Copy link
@lwasylow

lwasylow Apr 12, 2019

Member

I thought that trigger will be an optional to install ?

This comment has been minimized.

Copy link
@jgebal

jgebal Apr 12, 2019

Author Member

Optionality is on a TO-DO list for this feature.
I wanted to have it reviewed.

@lwasylow
Copy link
Member

left a comment

Looks really good. My only input would be, optional install and multi schema lots of devs working since trigger monitor full dB almost.

jgebal added some commits Mar 15, 2019

Fixed some issues with trigger
Some tests need to be fixed to disable trigger before testing
Some tests need to be added to prove trigger is working
Fixed uninstall script and constant.
Disabled `-scc` flag in tests

@jgebal jgebal force-pushed the feature/cache_improvements branch from 11a2310 to db8ef50 Apr 17, 2019

@jgebal jgebal changed the title Adding DDL trigger [WIP] Adding DDL trigger May 11, 2019

jgebal added some commits Jun 6, 2019

Merge remote-tracking branch 'origin/develop' into feature/ddl_trigge…
…r_for_annotations

# Conflicts:
#	source/core/annotations/ut_annotation_manager.pkb
#	source/core/ut_suite_manager.pkb
Fixed issues with parsing code through trigger.
Added disabling trigger on annotation parser tests.
Updated readme for installation with trigger.
Added additional tests for annotation management with / without trigger.
Fixed code for situations when trigger gets added on pre-existing tests.

@jgebal jgebal requested a review from lwasylow Jun 9, 2019

@jgebal jgebal changed the title [WIP] Adding DDL trigger Adding DDL trigger to speedup framework start Jun 9, 2019

@lwasylow
Copy link
Member

left a comment

Code looks great, I have put some comment on small things but generally great job Jacek, running even faster will be awesome !

Show resolved Hide resolved source/core/ut_suite_manager.pkb
Show resolved Hide resolved source/core/annotations/ut_trigger_annotation_parsing.trg Outdated
limitations under the License.
*/

gc_check_object_name constant varchar2(128) := 'UT3_TRIGGER_ALIVE';

This comment has been minimized.

Copy link
@lwasylow

lwasylow Jun 9, 2019

Member

Would that not be better to define in utils for example and refer to it via package constant in trigger and this package ? Its only called twice but one less line to maintain ?

This comment has been minimized.

Copy link
@jgebal

jgebal Jun 9, 2019

Author Member

This needs to be removed as no longer used - thanks

jgebal added some commits Jun 9, 2019

Addressed review comments.
Refactored install scripts to avoid duplication.
Added check for `oracle_maintained` schema when firing DDL trigger.
Fixed issue with style check.
Reorganized code to avoid problems with conditional compilation on 12.2 for triggers.

@jgebal jgebal added the enhancement label Jun 10, 2019

@jgebal jgebal merged commit f56cc49 into develop Jun 10, 2019

4 checks passed

SonarCloud Code Analysis Quality Gate passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls First build on feature/cache_improvements at 94.975%
Details

@jgebal jgebal deleted the feature/cache_improvements branch Jun 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.