Monday, June 13, 2016

Loopback doing full table scan for RoleMapping and AccessToken

Leave a Comment

In doing a slow-query analysis on my mongo database, I'm seeing a large number of blank scans at the top of the query list.

Is this something that others are seeing? Is this a bug in my code or something unaddressed in loopback?

Does this occur for all requests for unauthenticated users (i.e. $everyone)?

UPDATE #1: One of the culprits is a remote method:

{   "accessType":    "EXECUTE",   "principalType": "ROLE",   "principalId":   "$authenticated",   "permission":    "ALLOW",   "property":      "myRemoteMethod" }, 

This query is taking 213ms and scanning a ton of rows.

Components are:

  • "loopback": "2.27.0",
  • "loopback-connector-mongodb": "1.13.3",
  • "loopback-datasource-juggler": "2.46.0",

slow-query-log

Referenced here: https://groups.google.com/forum/#!topic/loopbackjs/bOkCw4DefvY

0 Answers

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment