Tried using KEYDIFF or KEYPATCH code keywords on a Roxie cluster (roxie & hthor targets), but it only returns the following exception: "System error: -1: UNIMPLEMENTED activity 'keydiff'"
The code used for this test follows:
rec:= RECORD
string10 name;
unsigned2 age;
END;
/*
ds1 := DATASET([{'Name1',10},{'Name2',20}],{rec});
ds2 := DATASET([{'Name1',10},{'Name2',20},{'Name3',20}],{rec});
a := output(ds1,,'~BMFtest::file1',overwrite);
b := output(ds2,,'~BMFtest::file2',overwrite);
a;
b;
*/
newds1 := dataset('~BMFtest::file1',{rec,UNSIGNED8 recpos {virtual(fileposition)}},thor);
newds2 := dataset('~BMFtest::file2',{rec,UNSIGNED8 recpos {virtual(fileposition)}},thor);
//newds1;
//newds2;
i1 := INDEX(newds1,{name,recpos},'~BMFtest::file1_idx');
i2 := INDEX(newds2,{name,recpos},'~BMFtest::file2_idx');
C := buildindex(i1);
d := buildindex(i2);
// SEQUENTIAL(PARALLEL(A,B),PARALLEL(C,D)); //BUILD THIS FIRST, THEN RUN KEYDIFF
KEYDIFF(i1,i2,'~BMFtest::DIFF::i1i2',OVERWRITE);
Regarding HPCC infrastructure, we have separate THOR and Roxie Clusters. We were looking to KEYDIFF/PATCH as a way to greatly reduce the amount of data we need to transfer from one cluster to another during deploys (thor -> roxie).
Is this not meant for use in Roxie? being able to patch indexes after they're transferred from Thor to Roxie would be very beneficial here.
I believe that KEYPACH and KEYDIFF were always a THOR only process. You update your key on THOR and then publish to ROXIE. ROXIE is designed to be read-only and a dedicated delivery cluster.
The better way to deploy indexes is to use package maps and superkeys. This blog has all the details of best practices and deployment to ROXIE:
Regards,
Bob