lujiajing1126 commented on code in PR #239:
URL: 
https://github.com/apache/skywalking-banyandb/pull/239#discussion_r1083442123


##########
banyand/liaison/grpc/registry.go:
##########
@@ -435,7 +437,37 @@ type topNAggregationRegistryServer struct {
 func (ts *topNAggregationRegistryServer) Create(ctx context.Context,
        req *databasev1.TopNAggregationRegistryServiceCreateRequest,
 ) (*databasev1.TopNAggregationRegistryServiceCreateResponse, error) {
-       if err := 
ts.schemaRegistry.TopNAggregationRegistry().CreateTopNAggregation(ctx, 
req.GetTopNAggregation()); err != nil {
+       topNSchema := req.GetTopNAggregation()

Review Comment:
   > 1. Move `processorManager.start` to the `Serve` phase. That means you 
should iterate all measures to start their embedded `processorManager`
   
   I take the first approach which is straight forward.
   
   > 2. Introduce Etcd's transactional operation. You could leverage a 
transaction to create topN resource and its derived measure by moving the 
creation operation to the `metadata` module instead of `liaison`.
   
   We should support transactional op which would be helpful for 
https://github.com/apache/skywalking/issues/10010. The current client impl 
could cause incomplete metadata registration in some edge cases.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to