Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-35197

Need to include GSI lastScanTime in /indexStatus

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.5.0
    • 6.5.0
    • ns_server
    • Untriaged
    • Unknown

    Description

      This is carry over from an item in MB-34337 which mentions about listing some important index attributes. 

      It would be good to find some place to display the following per-index attribute:

      a. Last scan time(lastScanTime)

      --lastScanTime is now available from the index service via the /getIndexStatus API call, but it is not included in ns_server's /indexStatus. This would be very useful to help users determine which indexes are not being used.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          Thanks Eben Haber. In case it helps, we added another parameter "stale" to /getIndexStatus recently and Pavel was able to add it to the /indexStatus. Please see MB-31805 (http://review.couchbase.org/#/c/112049/). 

          Regarding the item size distribution, that is not required as of now. I will update the bug description to reflect that.

          deepkaran.salooja Deepkaran Salooja added a comment - Thanks Eben Haber . In case it helps, we added another parameter "stale" to /getIndexStatus recently and Pavel was able to add it to the /indexStatus. Please see  MB-31805 ( http://review.couchbase.org/#/c/112049/ ).  Regarding the item size distribution, that is not required as of now. I will update the bug description to reflect that.

          Looks like Eben has a fix http://review.couchbase.org/#/c/113763/  so assigning this to him

          steve.watanabe Steve Watanabe added a comment - Looks like Eben has a fix  http://review.couchbase.org/#/c/113763/   so assigning this to him
          eben Eben Haber added a comment -

          I just merged the fix for this.

          eben Eben Haber added a comment - I just merged the fix for this.

          Build couchbase-server-6.5.0-4169 contains ns_server commit 26ef530 with commit message:
          MB-35197 - add lastScanTime to /indexStatus report

          build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.0-4169 contains ns_server commit 26ef530 with commit message: MB-35197 - add lastScanTime to /indexStatus report

          Validated this on 6.5.0-4169

          [root@node1-cb600-centos7 bin]# cat /opt/couchbase/VERSION.txt 
          6.5.0-4169
          [root@node1-cb600-centos7 bin]# curl -u Administrator:password http://10.112.190.101:8091/indexStatus
          {"indexes":[{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":5536512135818709930,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE INDEX `def_airportname` ON `travel-sample`(`airportname`) WITH {  \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"*lastScanTime*":"NA","indexName":"def_airportname","index":"def_airportname","id":14102646333260174384},{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":14772311919215551153,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE INDEX `def_city` ON `travel-sample`(`city`) WITH {  \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"*lastScanTime*":"NA","indexName":"def_city","index":"def_city","id":13114641344871349602},{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":821904336401607027,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE INDEX `def_faa` ON `travel-sample`(`faa`) WITH {  \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"lastScanTime":"NA","indexName":"def_faa","index":"def_faa","id":4294647941588825964},{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":11595475639631907113,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE INDEX `def_icao` ON `travel-sample`(`icao`) WITH {  \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"lastScanTime":"NA","indexName":"def_icao","index":"def_icao","id":5026581128150761680},{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":7338830918549323422,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE INDEX `def_name_type` ON `travel-sample`(`name`) WHERE (`_type` = \"User\") WITH {  \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"lastScanTime":"NA","indexName":"def_name_type","index":"def_name_type","id":17298253324656562783},{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":12181934734431651160,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE PRIMARY INDEX `def_primary` ON `travel-sample` WITH {  \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"lastScanTime":"NA","indexName":"def_primary","index":"def_primary","id":4745533497309205498},{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":4290822700325421154,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE INDEX `def_route_src_dst_day` ON `travel-sample`(`sourceairport`,`destinationairport`,(distinct (array (`v`.`day`) for `v` in `schedule` end))) WHERE (`type` = \"route\") WITH {  \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"lastScanTime":"NA","indexName":"def_route_src_dst_day","index":"def_route_src_dst_day","id":5210706569351914803},{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":1995491988401261869,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE INDEX `def_schedule_utc` ON `travel-sample`(array (`s`.`utc`) for `s` in `schedule` end) WITH {  \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"lastScanTime":"NA","indexName":"def_schedule_utc","index":"def_schedule_utc","id":5764617539240438195},{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":13589391645726291490,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE INDEX `def_sourceairport` ON `travel-sample`(`sourceairport`) WITH {  \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"lastScanTime":"NA","indexName":"def_sourceairport","index":"def_sourceairport","id":16122245311709729935},{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":3951910700651165635,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE INDEX `def_type` ON `travel-sample`(`type`) WITH {  \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"lastScanTime":"NA","indexName":"def_type","index":"def_type","id":17006435336779373629}],"version":31710244,"warnings":[]}[root@node1-cb600-cen[root@node1-cb600-centos7 bin]# 
          

          Balakumaran.Gopal Balakumaran Gopal added a comment - Validated this on 6.5.0-4169 [root@node1-cb600-centos7 bin]# cat /opt/couchbase/VERSION.txt 6.5.0-4169 [root@node1-cb600-centos7 bin]# curl -u Administrator:password http://10.112.190.101:8091/indexStatus {"indexes":[{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":5536512135818709930,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE INDEX `def_airportname` ON `travel-sample`(`airportname`) WITH { \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"*lastScanTime*":"NA","indexName":"def_airportname","index":"def_airportname","id":14102646333260174384},{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":14772311919215551153,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE INDEX `def_city` ON `travel-sample`(`city`) WITH { \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"*lastScanTime*":"NA","indexName":"def_city","index":"def_city","id":13114641344871349602},{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":821904336401607027,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE INDEX `def_faa` ON `travel-sample`(`faa`) WITH { \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"lastScanTime":"NA","indexName":"def_faa","index":"def_faa","id":4294647941588825964},{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":11595475639631907113,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE INDEX `def_icao` ON `travel-sample`(`icao`) WITH { \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"lastScanTime":"NA","indexName":"def_icao","index":"def_icao","id":5026581128150761680},{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":7338830918549323422,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE INDEX `def_name_type` ON `travel-sample`(`name`) WHERE (`_type` = \"User\") WITH { \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"lastScanTime":"NA","indexName":"def_name_type","index":"def_name_type","id":17298253324656562783},{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":12181934734431651160,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE PRIMARY INDEX `def_primary` ON `travel-sample` WITH { \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"lastScanTime":"NA","indexName":"def_primary","index":"def_primary","id":4745533497309205498},{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":4290822700325421154,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE INDEX `def_route_src_dst_day` ON `travel-sample`(`sourceairport`,`destinationairport`,(distinct (array (`v`.`day`) for `v` in `schedule` end))) WHERE (`type` = \"route\") WITH { \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"lastScanTime":"NA","indexName":"def_route_src_dst_day","index":"def_route_src_dst_day","id":5210706569351914803},{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":1995491988401261869,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE INDEX `def_schedule_utc` ON `travel-sample`(array (`s`.`utc`) for `s` in `schedule` end) WITH { \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"lastScanTime":"NA","indexName":"def_schedule_utc","index":"def_schedule_utc","id":5764617539240438195},{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":13589391645726291490,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE INDEX `def_sourceairport` ON `travel-sample`(`sourceairport`) WITH { \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"lastScanTime":"NA","indexName":"def_sourceairport","index":"def_sourceairport","id":16122245311709729935},{"storageMode":"plasma","partitionMap":{"10.112.190.102:8091":[0]},"numPartition":1,"partitioned":false,"instId":3951910700651165635,"hosts":["10.112.190.102:8091"],"stale":false,"progress":100,"definition":"CREATE INDEX `def_type` ON `travel-sample`(`type`) WITH { \"defer_build\":true }","status":"Ready","bucket":"travel-sample","numReplica":0,"lastScanTime":"NA","indexName":"def_type","index":"def_type","id":17006435336779373629}],"version":31710244,"warnings":[]}[root@node1-cb600-cen[root@node1-cb600-centos7 bin]#

          People

            eben Eben Haber
            deepkaran.salooja Deepkaran Salooja
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty