DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • Application Mapping: 5 Key Benefits for Software Projects
  • Big Data Development and Its Value to the World
  • An Introduction To Data Connectivity and Data Connectivity Solutions
  • Spring Reactive Microservices: A Showcase

Trending

  • Analyzing Stock Tick Data in SingleStoreDB Using LangChain and OpenAI's Whisper
  • Decoding Business Source Licensing: A New Software Licensing Model
  • The Emergence of Cloud-Native Integration Patterns in Modern Enterprises
  • Exploring Sorting Algorithms: A Comprehensive Guide
  1. DZone
  2. Data Engineering
  3. Databases
  4. RavenDB & Locking Indexes

RavenDB & Locking Indexes

Oren Eini user avatar by
Oren Eini
·
May. 13, 13 · Interview
Like (0)
Save
Tweet
Share
2.35K Views

Join the DZone community and get the full member experience.

Join For Free

one of the things that we keep thinking about with ravendb is how to make it easier for you to run in production.

to that end, we introduce a new feature in 2.5, index locking. this looks like this:

image

but what does this mean, to lock an index?

well, let us consider a production system, in which you have the following index:

from u in docs.users
select new
{
   query = new[] { u.name, u.email, u.email.split('@') }
}

after you go to production, you realize that you actually needed to also include the fullname in the search queries as well. you can, obviously, do a full deployment from scratch, but it is generally so much easier to just fix the index definition on the production server, update the index definition on the codebase, and wait for the next deploy for them to match.

this works, except that in many cases, ravendb applications call indexcreation.createindexes() on start up. which means that on the next startup of your application, the change you just did will be reverted. these options allows you to lock an index for changes, either in such a way that gives you the ability ignore changes to this index, or by raising an error when someone tries to modify the index

it is important to note that this is not a security feature, you can at any time unlock the index. this is there to make help operations, that is all.

Production (computer science) application Lock (computer science) security Database Scratch (programming language)

Published at DZone with permission of Oren Eini, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Application Mapping: 5 Key Benefits for Software Projects
  • Big Data Development and Its Value to the World
  • An Introduction To Data Connectivity and Data Connectivity Solutions
  • Spring Reactive Microservices: A Showcase

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: