× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
SachinPrakash reported 2015-06-16T15:53:21Z  · tariqrahiman last modified 2015-06-18T16:12:59Z

MongoSQL - Cache the resultset (returned by DBCursor#iterator() ) internally


customer request enterprise
Dev
Emil Goicovici
emil.goicovici
QA
Jenny Nishimura
JennyNishimura
Priority Major
Complexity Unknown
Component MongoSQL
Version 16.0
Analysis
1. Turn on profiling db.setProfilingLevel(2)
2. Run a MongoSQL query, e.g. db.test.find() in "perf" database
3. Query the system.profile table looking for "query" entries for "perf.test" collection.
     select * from "system.profile" where op='query' and ns='perf.test'
 
Whenever a MongoSQL query is run, there are 3 "query" op entries in system.profile.  I used the debugger to step through the MongoJDBC Driver to see when a "query" op entry appears in system.profile.
 
1. MongoResultSet constructor: Set<String> reunion = MongoUtils.getColumnNames(data, flatteningType);
   This line of code goes through the result set to get the list of column names.
 
2. MongoResultSet constructor: metaData = new MongoMetaData(columns, buildPredictObject(predictDataType));
   This line of code goes through the result set to get the data types.  If the "predictDataType" driver parameter is set to false, this query is not reported in system.profile.
 
3. MongoResultSet.next
   This is when we finally iterates the result set to get the data.
 
Change in behavior
After step #1, the results will be cached in memory instead of requesting new DBCursor#iterator() for each (out of three) iteration request (performed for the same given user query)
 
TESTING IMPACT

In both MongoJS and MongoSQL, verify that big resultsets "memory leaks" don't occur, i.e. references (to all the DBObject instances for a given resultset) held by our JDBC internal cache(s) and GUI components are properly released (e.g. when Query Analyzer window is closed). 

Issue #13372

Closed
Fixed
Resolved 2015-06-16T19:25:53Z
 
 
Completion
No due date
Fixed Build ADS 16.0.5-13, ADS 17.0.0-dev-52
No time estimate

About AquaClusters Privacy Policy Support Version - 19.0.2-4 AquaFold, Inc Copyright © 2007-2017