Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated cache.GetApp logic to retrieve app info from boltdb database as well #290

Merged
merged 2 commits into from
Sep 29, 2021

Conversation

hvaghani221
Copy link
Collaborator

@hvaghani221 hvaghani221 commented Sep 22, 2021

Did following changes:

  • Changed the logic of cache.GetApp to retrieve app info from boltdb database if we do not find it from in-memory cache or remote.
  • Updated code comments accordingly
  • Added new debug logs to track when cache invalidation is done
  • Fixed gostaticcheck warning in some error messages

// Check if the app is available in boltdb cache
dbApp, _ := c.getAppFromDatabase(appGuid)
if dbApp != nil {
c.config.Logger.Debug(fmt.Sprint("Using old app info for cf_app_id ", appGuid))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug in the nozzle is sending everything to stdout, shall we update the whole debug logic or handle this differently?

Copy link
Collaborator Author

@hvaghani221 hvaghani221 Sep 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we enable the DEBUG mode, then the nozzle will dump all the event(events coming from remote and nozzle's log) to stdout. Otherwise it'll send it to the splunk.
Here, we are not enabling the DEBUG mode, but logging the message at debug level.

@hvaghani221 hvaghani221 merged commit c26a686 into develop Sep 29, 2021
@hvaghani221 hvaghani221 deleted the nozzle-cache-update-issue branch September 29, 2021 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants