mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-31 18:48:08 +00:00 
			
		
		
		
	Add a comment around why we are grabbing a lock to update an atomic boolean (#19087)
This commit is contained in:
		| @@ -416,6 +416,12 @@ func (b *backend) updatePkiStorageVersion(ctx context.Context, grabIssuersLock b | |||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	// If this method is called outside the initialize function, like say an | ||||||
|  | 	// invalidate func on a performance replica cluster, we should be grabbing | ||||||
|  | 	// the issuers lock to offer a consistent view of the storage version while | ||||||
|  | 	// other events are processing things. Its unknown what might happen during | ||||||
|  | 	// a single event if one part thinks we are in legacy mode, and then later | ||||||
|  | 	// on we aren't. | ||||||
| 	if grabIssuersLock { | 	if grabIssuersLock { | ||||||
| 		b.issuersLock.Lock() | 		b.issuersLock.Lock() | ||||||
| 		defer b.issuersLock.Unlock() | 		defer b.issuersLock.Unlock() | ||||||
|   | |||||||
							
								
								
									
										3
									
								
								changelog/19037.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								changelog/19037.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | |||||||
|  | ```release-note:bug | ||||||
|  | secrets/pki: Revert fix for PR [18938](https://github.com/hashicorp/vault/pull/18938) | ||||||
|  | ``` | ||||||
		Reference in New Issue
	
	Block a user
	 Steven Clark
					Steven Clark