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
Merged

Conversation

@jgebal
Copy link
Member

@jgebal jgebal 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.
Copy link
Member

@lwasylow lwasylow Apr 12, 2019

Choose a reason for hiding this comment

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

I thought that trigger will be an optional to install ?

Copy link
Member Author

@jgebal jgebal Apr 12, 2019

Choose a reason for hiding this comment

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

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

Copy link
Member

@lwasylow lwasylow 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 4 commits Apr 17, 2019
Some tests need to be fixed to disable trigger before testing
Some tests need to be added to prove trigger is working
Disabled `-scc` flag in tests
@jgebal jgebal force-pushed the feature/cache_improvements branch from 11a2310 to db8ef50 Apr 17, 2019
jgebal added 7 commits Jun 6, 2019
…r_for_annotations

# Conflicts:
#	source/core/annotations/ut_annotation_manager.pkb
#	source/core/ut_suite_manager.pkb
Added disabling trigger on annotation parser tests.
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
Copy link
Member

@lwasylow lwasylow 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 !

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

gc_check_object_name constant varchar2(128) := 'UT3_TRIGGER_ALIVE';
Copy link
Member

@lwasylow lwasylow Jun 9, 2019

Choose a reason for hiding this comment

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

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 ?

Copy link
Member Author

@jgebal jgebal Jun 9, 2019

Choose a reason for hiding this comment

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

This needs to be removed as no longer used - thanks

jgebal added 2 commits Jun 9, 2019
Refactored install scripts to avoid duplication.
Added check for `oracle_maintained` schema when firing DDL trigger.
Reorganized code to avoid problems with conditional compilation on 12.2 for triggers.
@jgebal jgebal merged commit f56cc49 into develop Jun 10, 2019
4 checks passed
@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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants