[SERVER-25933] Database::getViewCatalog should return const ViewCatalog& Created: 01/Sep/16  Updated: 05/Apr/17  Resolved: 29/Nov/16

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: James Wahlin Assignee: Daniel Gottlieb (Inactive)
Resolution: Done Votes: 0
Labels: neweng, read-only-views
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Storage 2016-12-12
Participants:

 Description   

Database::getViewCatalog in database.h/cpp currently returns a ViewCatalog*. We should change to return const& instead as ViewCatalog will always exist for a given Database object.



 Comments   
Comment by Daniel Gottlieb (Inactive) [ 29/Nov/16 ]

The "reading" methods of ViewCatalog such as lookup also check if the catalog has been invalidated and will refresh/mutate itself in those cases. Turning the return value into a const reference will require moving those invalidation/refresh checks to other places.

Generated at Thu Feb 08 04:10:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.