Skip to content

Commit b94ec80

Browse files
authored
add etag models (#542)
1 parent 65a57e3 commit b94ec80

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

dao-api/src/main/pegasus/com/linkedin/metadata/internal/IngestionParams.pdl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ namespace com.linkedin.metadata.internal
22

33
import com.linkedin.metadata.events.IngestionMode
44
import com.linkedin.metadata.events.IngestionTrackingContext
5+
import pegasus.com.linkedin.metadata.events.IngestionAspectETag
56

67
/**
78
* Record defining ingestion-related parameters that can be passed into DAO API calls.
@@ -22,4 +23,9 @@ record IngestionParams {
2223
* For validation purposes. And no MAE will be emitted during the persistance
2324
*/
2425
testMode: boolean = false
25-
}
26+
27+
/**
28+
* eTag for aspect ingestion optimistic locking
29+
*/
30+
ingestionETags: optional array[IngestionAspectETag] = [ ]
31+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
namespace pegasus.com.linkedin.metadata.events
2+
3+
/**
4+
* eTag used for atomic aspect updating
5+
*/
6+
record IngestionAspectETag {
7+
8+
/**
9+
* aspect FQCN
10+
*/
11+
aspect_name: optional string = ""
12+
13+
/**
14+
* e.g. timestamp used for optimistic locking when writing new aspect value
15+
*/
16+
eTag: optional long = 0
17+
}

0 commit comments

Comments
 (0)