You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/02/25 08:54:01 UTC

[GitHub] [servicecomb-service-center] robotLJW opened a new pull request #873: [SCB-2094] modify data-source.rst and db.js

robotLJW opened a new pull request #873:
URL: https://github.com/apache/servicecomb-service-center/pull/873


   
   


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

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



[GitHub] [servicecomb-service-center] tianxiaoliang merged pull request #873: [SCB-2094] modify data-source.rst and db.js

Posted by GitBox <gi...@apache.org>.
tianxiaoliang merged pull request #873:
URL: https://github.com/apache/servicecomb-service-center/pull/873


   


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

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



[GitHub] [servicecomb-service-center] tianxiaoliang commented on a change in pull request #873: [SCB-2094] modify data-source.rst and db.js

Posted by GitBox <gi...@apache.org>.
tianxiaoliang commented on a change in pull request #873:
URL: https://github.com/apache/servicecomb-service-center/pull/873#discussion_r582713649



##########
File path: deployments/db.js
##########
@@ -19,11 +19,27 @@ db.createUser(
     {
         user: "sc",
         pwd: "123",
-        roles:[
+        roles: [
             {
                 role: "readWrite",
-                db:   "servicecenter"
+                db: "servicecenter"
             }
         ]
     }
 );
+
+//index
+db.service.createIndex({"service.service_id": 1}, {unique: true});
+db.service.createIndex({
+    "service.app": 1,
+    "service.service_name": 1,
+    "service.env": 1,
+    "service.version": 1,
+    "domain": 1,
+    "project": 1,
+}, {unique: true});
+db.instance.createIndex({"refresh_time": 1}, {expireAfterSeconds: 60});
+db.instance.createIndex({"instance_id.service_id": 1});

Review comment:
       这个索引建错了




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

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