tracker issue : CF-3954042

select a category, or use search below
(searches all categories and all time range)
Title:

cacheGetMetadata() Null Error attempting to access key with large query

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/

Reporter/Name(from Bugbase): James Moberg / James Moberg (James Moberg)

Created: 03/16/2015

Components: Caching

Versions: 9.0.1

Failure Type: Crash

Found In Build/Fixed In Build: 9.0.1 /

Priority/Frequency: Critical / All users will encounter

Locale/System: English / Win 2008 Server R2

Vote Count: 0

Problem Description:  Large queries that are cached via cachePut() can't be accessed using cacheGetMetadata(). An error message that simply states "null null The error occurred on line -1." is thrown.  You can't even add CFTRY/CATCH around it.  The key is returned properly via cacheGetAllIds() and can be retrieved via cacheGet(), but cacheGetMetadata() throw an error that can't be caught by CFTRY.

NOTE: This bug was reported 2.5 months prior to ColdFusion 10 being released and ~2 years prior to CF9's EOL. It's possible that it was a ColdFusion9 bug that was upgraded to 10 and ignored in 9. I don't understand why it wasn't additionally tested w/CF9. I'm posting it here so that other CF9 users are aware of the issue.
https://bugbase.adobe.com/index.cfm?event=bug&id=3123950

Steps to Reproduce:

<CFSET TestQuery = QueryNew("id,id2,name,name2,num1,code1,num2,num3", "integer,integer,varchar,varchar,integer,varchar,integer,integer")>

<CFSET QueryAddRow(TestQuery, 4000)>
<cfloop index="i" from="1" to="4000">
	<CFSET QuerySetCell(TestQuery, "id", i, i)>
	<CFSET QuerySetCell(TestQuery, "id2", 10, i)>
	<CFSET QuerySetCell(TestQuery, "name", "Kavya_#i#", i)>
	<CFSET QuerySetCell(TestQuery, "name2", "drawing#i#", i)>
	<CFSET QuerySetCell(TestQuery, "num1", 1, i)>
	<CFSET QuerySetCell(TestQuery, "code1", "9", i)>
	<CFSET QuerySetCell(TestQuery, "num2", 0, i)>
	<CFSET QuerySetCell(TestQuery, "num3", 12, i)>
</cfloop>

<CFSET cacheRemove("cacheTest")>

<CFSET cachePut("cacheTest", TestQuery, CreateTimeSpan(0,0,10,0))>

<CFTRY>
	<CFDUMP VAR="#cacheGetMetadata('cacheTest')#">
	<CFCATCH>There was an error</CFCATCH>
</CFTRY>

Actual Result:

     An unforgiving error without any workaround.  CFTRY/CATCH does work.
     Error Message:  null null  The error occurred on line -1.

Expected Result:

     A struct with stats regarding the cached item; definitely not a CF error without any workaround.


Any Workarounds:

    None.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3954042

External Customer Info:
External Company:  
External Customer Name: James
External Customer Email:  
External Test Config: My Hardware and Environment details:

Windows 2008 R2, CF 9,0,1,274733  Java 1.6.0_17

Attachments:

Comments:

Unable to repro on ColdFusion 10 and ColdFusion 11. Hence closing the bug.
Comment by Akhila K.
8036 | April 17, 2015 02:46:29 AM GMT