wu-sheng commented on a change in pull request #8705:
URL: https://github.com/apache/skywalking/pull/8705#discussion_r829822475



##########
File path: 
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/storage/annotation/Column.java
##########
@@ -102,6 +101,28 @@
      */
     AnalyzerType analyzer() default AnalyzerType.OAP_ANALYZER;
 
+    /**
+     * Sharding key is used to group time series data per metric of one entity.
+     * For example,
+     * ServiceA's traffic gauge, service call per minute, includes following 
timestamp values, then it should be shard
+     * by service ID
+     * [ServiceA(encoded ID): 01-28 18:30 values-1, 01-28 18:31 values-2, 
01-28 18:32 values-3, 01-28 18:32 values-4]
+     *
+     * BanyanDB is the 1st storage implementation supporting this. It would 
make continuous time series metrics stored
+     * closely and compressed better.
+     *
+     * 1. One entity at most has one sharding key
+     * 2. If no column is appointed for this, {@link 
org.apache.skywalking.oap.server.core.storage.StorageData#id}
+     * would
+     * be used by the storage implementation accordingly.
+     *
+     * NOTICE, this sharding concept is NOT for splitting data into different 
database instances or physical files.
+     *
+     * @return TRUE if this column could(not must) be used for sharding.
+     * @since 9.0.0
+     */
+    boolean shardingKey() default false;

Review comment:
       @hanahmily @lujiajing1126 Please check this comment carefully. I want to 
be sure I understand this concept correctly.




-- 
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