Skip to content

Commit

Permalink
chimera : fix trigger that populates data in t_locationinfo and
Browse files Browse the repository at this point in the history
                                  t_inodes on insert or update of t_level_4

                        Motivation:

                        When access latency and retention policy were moved
                        to t_inodes table they were given underscore separated
                        names, but the trigger that populates data in t_locationinfo and
                        t_inodes on insert or update of t_level_4 was not properly
                        adjusted to account for the column name change.

                        Modification:

                        Trivial fix of column names

                        Result:

                        Enstore works with dCache again

                        Release Notes:

                        Fix trigger on insert/update on t_level_4 to enable
                        Enstore client to work again.

                        RB : https://rb.dcache.org/r/9189/
                        Target: master
                        Request: 2.15
                        Require-book: no
                        Require-notes: yes
                        Acked-by: Gerd Behrmann <behrmann@gmail.com>
  • Loading branch information
DmitryLitvintsev committed Apr 8, 2016
1 parent 9692cb8 commit 552fc76
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1846,8 +1846,8 @@
</rollback>
</changeSet>

<changeSet id="24" author="behrmann" dbms="postgresql">
<comment>Update enstore procedures for inumber changes</comment>
<changeSet author="litvinse" id="24.1" dbms="postgresql">
<comment>Fix trigger on insert or update on t_level_4</comment>

<createProcedure>
--
Expand Down Expand Up @@ -1915,13 +1915,13 @@
INSERT INTO t_storageinfo
VALUES (NEW.inumber,'enstore','enstore',l_entries[4]);
END IF;
--
--
-- we assume all files coming through level4 to be CUSTODIAL-NEARLINE
--
--
-- the block below is needed for files written directly by encp
--
BEGIN
UPDATE t_inodes SET iaccesslatency = 0, iretentionpolicy = 0 WHERE inumber = NEW.inumber;
UPDATE t_inodes SET iaccess_latency = 0, iretention_policy = 0 WHERE inumber = NEW.inumber;
END;
ELSEIF (TG_OP = 'UPDATE') THEN
file_data := encode(NEW.ifiledata, 'escape');
Expand Down Expand Up @@ -2014,13 +2014,13 @@
INSERT INTO t_storageinfo
VALUES (NEW.ipnfsid,'enstore','enstore',l_entries[4]);
END IF;
--
--
-- we assume all files coming through level4 to be CUSTODIAL-NEARLINE
--
--
-- the block below is needed for files written directly by encp
--
BEGIN
UPDATE t_inodes SET iaccesslatency = 0, iretentionpolicy = 0 WHERE ipnfsid = NEW.ipnfsid;
UPDATE t_inodes SET iaccess_latency = 0, iretention_policy = 0 WHERE ipnfsid = NEW.ipnfsid;
END;
ELSEIF (TG_OP = 'UPDATE') THEN
file_data := encode(NEW.ifiledata, 'escape');
Expand Down

0 comments on commit 552fc76

Please sign in to comment.