hanahmily commented on code in PR #334:
URL: 
https://github.com/apache/skywalking-banyandb/pull/334#discussion_r1332527333


##########
pkg/node/maglev_test.go:
##########
@@ -0,0 +1,48 @@
+// Licensed to Apache Software Foundation (ASF) under one or more contributor
+// license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright
+// ownership. Apache Software Foundation (ASF) licenses this file to you under
+// the Apache License, Version 2.0 (the "License"); you may
+// not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package node
+
+import (
+       "testing"
+
+       "github.com/stretchr/testify/assert"
+
+       commonv1 
"github.com/apache/skywalking-banyandb/api/proto/banyandb/common/v1"
+       databasev1 
"github.com/apache/skywalking-banyandb/api/proto/banyandb/database/v1"
+)
+
+func TestMaglevSelector(t *testing.T) {

Review Comment:
   This case is for the consistency result for the same shard. That's great. 
But let's add more functionality and performance tests:
   
   1. Distribution Testing: This test would validate the distribution of the 
Maglev hashing. If we query the data node for many different shards, the 
distribution of the results should be roughly even among all the data nodes.
   2. Adding a data node: This test validates how the system behaves when 
adding a new data node. Ideally, only a small set of the shards should be 
remapped . **We should know the ratio and document it.**
   3. Removing a data node: This test validates how the system behaves when 
removing a data node. Ideally, only the keys mapped to the removed node should 
be remapped.
   4. Performance Testing: This test is a benchmark that would validate the 
performance of the Maglev hashing algorithm by checking the time it takes to 
get the data node for many shards.



-- 
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: notifications-unsubscr...@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to