Project

General

Profile

Bug #7635

RemoteObject defaults to 'tracing' mode

Added by Constantin Asofiei 10 months ago. Updated 9 months ago.

Status:
Test
Priority:
Normal
Assignee:
Target version:
-
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:
version:

History

#1 Updated by Constantin Asofiei 10 months ago

In RemoteObject, the LOG instance gets created and RemoteObject$RemoteAccess.tracing flag gets set before the logging is configured - and as by default isLoggable returns true, then the 'tracing' flag gets set to true, via this stacktrace:

CentralLoggerNoModeWrapper(CentralLogger).isLoggable(Level) line: 1057    
RemoteObject$RemoteAccess.<init>(Session, int) line: 1429    
RemoteObject.obtainNetworkInstance(Class<?>[], Session, int) line: 1045    
RemoteObject.obtainNetworkInstance(Class<?>, Session) line: 914    
DirectoryManager.initRemote(Session) line: 95    
ClientCore.initialize(InitStruct, boolean, BootstrapConfig, Supplier<String>, String) line: 306    
ClientCore.start(BootstrapConfig, boolean, Supplier<String>) line: 479    
ClientDriver.start(BootstrapConfig) line: 270    
ClientDriver(CommonDriver).process(String[]) line: 539    
ClientDriver.process(String[]) line: 347    
ClientDriver.main(String[]) line: 390    

We need a way to refresh this flag once the logging has initialized.

#2 Updated by Galya B 10 months ago

  • Assignee set to Galya B
  • Status changed from New to WIP

#3 Updated by Galya B 10 months ago

  • % Done changed from 0 to 100
  • Status changed from WIP to Review

7635a r14669 simply removing the flag should be good enough. There is already optimization and invalidation in the CentralLogger instance itself, that is enough.

#4 Updated by Greg Shah 10 months ago

Code Review 7635a Revision 14669

The change is fine. The cost is 3 extra method calls (isLoggable() and inside there are two calls to Level.intValue() which is just returning a final int value). This should not matter (especially if it gets inlined in the JIT results).

In the future, please add your history entry before the code review.

#5 Updated by Greg Shah 10 months ago

You can merge to trunk.

#6 Updated by Galya B 10 months ago

  • Status changed from Review to Test

I forgot.

Task branch 7635a was merged to trunk as rev 14671 and archived.

#7 Updated by Constantin Asofiei 9 months ago

The same fix needs to be done at Dispatcher.tracing.

#8 Updated by Galya B 9 months ago

Constantin, I see you often merge branches. Can you make those small updates to logs, you're most well familiar with, in your own branches? I was expecting tweaking to be required after the initial merge, but it involves the whole system and everyone can take over it.

Also available in: Atom PDF