DBA Data[Home] [Help]

PACKAGE: SYSTEM.AD_PARALLEL_COMPILE_PKG

Source


1 package ad_parallel_compile_pkg as
2 /* $Header: adpcpsps.pls 120.0 2005/05/25 11:52:29 appldev noship $ */
3 
4 procedure get_invalid
5            (schema_to_compile   in varchar2,
6             obj_type_to_exclude in varchar2);
7 
8 --
9 -- get_invalid() loads information about all invalid objects
10 -- in <schema_to_compile> into the AD_PARALLEL_COMPILE table
11 --
12 -- specify obj_type_to_exclude as "NONE" to get all invalid
13 --  objects in the schema
14 -- specify obj_type_to_exclude as a special code for the type of object
15 --  to exclude.  Currently-supported codes are:
16 --
17 --    - "BODY" to exclude package bodies
18 --
19 
20 procedure delete_errobjs
21            (schema_to_compile in varchar2);
22 
23 --
24 -- delete errobjs deletes objects that are listed in user_errors
25 -- with compilation problems.
26 --
27 
28 procedure update_done;
29 
30 --
31 -- update_done updates the AD_PARALLEL_COMPILE table to list which
32 -- objects have been successfully compiled
33 --
34 --
35 -- update_done depends only on object numbers, so it does not
36 -- need information about the owning schema
37 --
38 
39 procedure comp_dependencies
40            (schema_to_compile       in varchar2);
41 procedure comp_dependencies
42            (schema_to_compile       in varchar2,
43             use_stored_dependencies in varchar2);
44 
45 --
46 -- comp_dependencies computes the dependency tree for all invalid objects
47 -- in the schema_to_compile
48 --
49 -- The levels look like:
50 --
51 --  Level 0: don't depend on any other invalid objects for this schema
52 --           listed in AD_PARALLEL_COMPILE table
53 --
54 --  Level 1: depend on other invalid objects for this schema
55 --           at level 0
56 --
57 --  Level 2: depend on other invalid objects for this schema
58 --           at level 0 or 1
59 --
60 --  Level N: depend on other invalid objects for this schema
61 --           at levels 0 through (N-1)
62 --
63 --
64 -- In our current implementation, we ignore cross-schema dependencies
65 -- (a cross-schema dependency is when an invalid object in schema A
66 --  depends on a different invalid object in schema B).
67 -- This is partly because we don't think there should be any cross-schema
68 -- dependencies, and partly because our current parallel compilation scheme
69 -- does not allow us to handle cross-schema dependencies properly
70 -- (we currently compile schema A with all available workers, then compile
71 --  schema B with all available workers, then compile schema C with all
72 --  available workers, and so on).
73 --
74 
75 procedure assign_tasks
76            (schema_to_compile in varchar2,
77             number_of_workers in integer);
78 
79 procedure assign_tasks
80            (schema_to_compile in varchar2,
81             number_of_workers in integer,
82             distribute_java   in varchar2);
83 
84 -- assign_tasks_single assigns tasks to a single logical worker
85 
86 procedure assign_tasks_single
87            (schema_to_compile in varchar2,
88             log_worker_num    in integer);
89 
90 --
91 -- assign_tasks() splits up the invalid objects in schema_to_compile
92 -- across the N logical workers, giving each worker about the same amount
93 -- of work.
94 --
95 -- Our strategy is to break the list up evenly across the available logical
96 -- workers so that worker 1 does 1/N of level 0, followed by 1/N of level 1,
97 -- followed by 1/N of level 2, and so on.  Other workers do the same thing.
98 --
99 -- By compiling the objects with no dependencies (level 0), followed by the
100 -- objects that only depend on them (level 1), followed by the objects that
101 -- only depend on other objects from the first two levels, etc., we hope to
102 -- avoid both recursive compilations and interdependencies between objects
103 -- that are being compiled by different workers
104 --
105 -- The distribute_java flag specifies if invalid java objects are distributed
106 -- across the N logical workers. The default value is 'N'. In this case, all
107 -- invalid java objects are assigned to worker 1. The worker 1 will not be
108 -- assigned other objects until other workers are assigned at least the same
109 -- number of objects and there are more objects to be assigned.
110 --
111 -- If distribute_java flag is 'Y', the java objects are treated same as other
112 -- objects and assigned evenly across logical workers.
113 --
114 
115 
116 procedure comp
117            (worker_number in integer,
118             target_schema in varchar2);
119 
120 --
121 -- Comp actually compiles the invalid objects
122 --
123 
124 end ad_parallel_compile_pkg;