can not create an access policy. keep getting "Cannot reserve JVM while holding global locks"
Running
Vertica Analytic Database v8.1.0-2
Had an access policy created and it was working fine.
I then deleted it.
I then tried to recreate it and now keep getting the following even after a reboot of the vm.
2018-06-26 14:05:34.073 Init Session:7fc689ffc700-a0000000011b3e [Txn] Rollback Txn: a0000000011b3e 'CREATE ACCESS POLICY ON employee_dimension_protected FOR COLUMN annual_salary
CASE
WHEN enabled_role('allow_access') THEN detokenizedata(annual_salary_token)
ELSE annual_salary_token
END ENABLE;'
2018-06-26 14:05:34.073 Init Session:7fc689ffc700 @v_vmart_node0001: VX001/6482: Failed to parse Access Policies for table "employee_dimension_protected" [Cannot reserve JVM while holding global locks]
LOCATION: _verifyAndSetTypeAccessPolicy, /scratch_a/release/svrtar25120/vbuild/vertica/Commands/DDL.cpp:9692
2018-06-26 14:05:36.009 DiskSpaceRefresher:7fc64bbd7700 [Util] Task 'DiskSpaceRefresher' enabled
Here is the table.
CREATE TABLE public.employee_dimension_protected
(
employee_key int NOT NULL,
employee_gender varchar(8),
courtesy_title varchar(8),
employee_first_name varchar(64),
employee_middle_initial varchar(8),
employee_last_name varchar(64),
employee_age int,
hire_date date,
employee_street_address varchar(256),
employee_city varchar(64),
employee_state char(2),
employee_region char(32),
job_title varchar(64),
reports_to int,
salaried_flag int,
annual_salary int,
hourly_rate float,
vacation_days int,
annual_salary_token varchar(25)
);
ALTER TABLE public.employee_dimension_protected ADD CONSTRAINT C_PRIMARY PRIMARY KEY (employee_key) DISABLED;
CREATE PROJECTION public.employee_dimension_protected_super /+basename(employee_dimension_protected),createtype(L)/
(
employee_key,
employee_gender,
courtesy_title,
employee_first_name,
employee_middle_initial,
employee_last_name,
employee_age,
hire_date,
employee_street_address,
employee_city,
employee_state,
employee_region,
job_title,
reports_to,
salaried_flag,
annual_salary,
hourly_rate,
vacation_days,
annual_salary_token
)
AS
SELECT employee_dimension_protected.employee_key,
employee_dimension_protected.employee_gender,
employee_dimension_protected.courtesy_title,
employee_dimension_protected.employee_first_name,
employee_dimension_protected.employee_middle_initial,
employee_dimension_protected.employee_last_name,
employee_dimension_protected.employee_age,
employee_dimension_protected.hire_date,
employee_dimension_protected.employee_street_address,
employee_dimension_protected.employee_city,
employee_dimension_protected.employee_state,
employee_dimension_protected.employee_region,
employee_dimension_protected.job_title,
employee_dimension_protected.reports_to,
employee_dimension_protected.salaried_flag,
employee_dimension_protected.annual_salary,
employee_dimension_protected.hourly_rate,
employee_dimension_protected.vacation_days,
employee_dimension_protected.annual_salary_token
FROM public.employee_dimension_protected
ORDER BY employee_dimension_protected.employee_key
SEGMENTED BY hash(employee_dimension_protected.employee_key) ALL NODES OFFSET 0;
SELECT MARK_DESIGN_KSAFE(0);
Answers
Issue is the Java UDX in your access policy. As a workaround, try running this query in the session first:
select detokenizedata(annual_salary_token) from employee_dimension_protected;