Commit 8aa92af6 authored by Diego Molteni's avatar Diego Molteni
Browse files

fix ctag

parent f0e02afa
......@@ -23,7 +23,7 @@ import { Locker } from './locker';
export class DatasetDAO {
public static async register(journalClient: IJournal | IJournalTransaction, datasetEntity: any) {
datasetEntity.ctag = Utils.makeID(16);
datasetEntity.data.ctag = Utils.makeID(16);
journalClient.save(datasetEntity);
}
......
......@@ -596,8 +596,6 @@ export class DatasetHandler {
? DESStorage.insertRecord(req.headers.authorization, [seismicmetaDE],
tenant.esd, req[Config.DE_FORWARD_APPKEY]) : undefined]);
// attach the gcpid for fast check
datasetOUT.ctag = datasetOUT.ctag + tenant.gcpid + ';' + DESUtils.getDataPartitionID(tenant.esd);
// attach lock information
if (wid) {
......@@ -605,6 +603,10 @@ export class DatasetHandler {
datasetOUT.sbit_count = lockres.cnt;
}
await transaction.commit();
// attach the gcpid for fast check
datasetOUT.ctag = datasetOUT.ctag + tenant.gcpid + ';' + DESUtils.getDataPartitionID(tenant.esd);
return datasetOUT;
} catch (err) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment