File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
x-pack/plugins/security_solution/server/lib/detection_engine/routes/index Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ export const createDetectionIndex = async (
7878 const indexExists = await getIndexExists ( callCluster , index ) ;
7979 if ( indexExists ) {
8080 const indexVersion = await getIndexVersion ( callCluster , index ) ;
81- if ( indexVersion !== SIGNALS_TEMPLATE_VERSION ) {
81+ if ( ( indexVersion ?? 0 ) < SIGNALS_TEMPLATE_VERSION ) {
8282 await callCluster ( 'indices.rollover' , { alias : index } ) ;
8383 }
8484 } else {
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export const readIndexRoute = (router: IRouter) => {
3838 let mappingOutdated : boolean | null = null ;
3939 try {
4040 const indexVersion = await getIndexVersion ( clusterClient . callAsCurrentUser , index ) ;
41- mappingOutdated = indexVersion !== SIGNALS_TEMPLATE_VERSION ;
41+ mappingOutdated = ( indexVersion ?? 0 ) < SIGNALS_TEMPLATE_VERSION ;
4242 } catch ( err ) {
4343 const error = transformError ( err ) ;
4444 // Some users may not have the view_index_metadata permission necessary to check the index mapping version
You can’t perform that action at this time.
0 commit comments