Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Adding DDL trigger to speedup framework start #901

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

Merged
merged 17 commits into from
Jun 10, 2019

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 April 11, 2019 06:45
@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

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

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

Choose a reason for hiding this comment

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

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

source/core/annotations/ut_trigger_annotation_parsing.trg Outdated Show resolved Hide resolved
jgebal added 4 commits April 17, 2019 23:53
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 Compare April 17, 2019 22:56
jgebal added 7 commits June 6, 2019 01:15
…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 June 9, 2019 16:54
@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

Choose a reason for hiding this comment

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

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

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

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 June 10, 2019 00:13
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
@jgebal jgebal deleted the feature/cache_improvements branch June 10, 2019 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to parse annotations when package specification is getting compiled
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.