This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
StackDataStorage doesn't use passed contextID for calculating functionid => functions (and metrics) from different contexts (processes, for example) get mixed. It is important to fix this for solstudio..
Created attachment 107044 [details] Proposed patch The patch is save for the NetBeans functionality. We will only put additional column to the database and will change the id generation. For all parts in CND which uses StackStorage there will be no changes as context_id = -1 is used when put sample to the database
Created attachment 107051 [details] corrected patch: added context id in FuctionImpl in the previous patch only INSERT was changed, in the latest also SELECT
Created attachment 107052 [details] file corrected file corrected
this fix is required for DLight Tool and Analytics (part of Studio release)
Thanks. The last proposed fix seems to be OK with some notes: in generateFuncId() last block should be: synchronized (funcCache) { String id = context_id + funcName; Long funcId = funcCache.get(id); if (funcId == null) { funcId = ++funcIdSequence; AddFunctionRequest cmd = requestsProvider.addFunction(funcId, funcName, source_file_index, line_number, context_id); requestsProcessor.queueRequest(cmd); funcCache.put(id, funcId); } return funcId; }
Fixed in cnd-main http://hg.netbeans.org/cnd-main/rev/daef063de372 (this fix includes additional fix suggested by Andrew) Please verify. To verify you just need to check if Gizmo works
verified in dev build #4987
transplanted from cnd-main: daef063de372 transplanted to f8b8eec06d2d
Integrated into 'main-golden', will be available in build *201103180400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/daef063de372 User: Maria Tishkova <mromashova@netbeans.org> Log: BZ#196767 - StackDataStorage doesn't use passed contextID
verified in rc1 build 20110318