-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Search Sessions] Save all sessions, with persisted flag #89570
Changes from 36 commits
c22024f
1046c54
7040716
eeddf84
f09eb38
e6124af
e160019
3c08c3d
0cd92ed
f1a1d0b
552e545
ee6e337
32315b7
542de95
5b22249
66420b4
8a5e3d3
71582c7
03f413a
65840b3
fdb940b
b2bce4b
2e09f56
cb1de74
2b3b90e
cd23cef
5f21181
50081b5
e24181c
08ed572
cdcf562
bdbc748
667c9d3
867f1f4
51545ae
763746b
44ef260
bbf85c5
01f292d
7a85729
46cdf7f
393d800
2d75b96
13691e6
1cd21fd
a9cc263
bfcbdb2
9b914f6
ddb86a7
7ab767d
d924604
11f429e
48a90fb
de99c73
1bad580
53a820e
ab0ce8f
99b4ca0
99dc347
89d0887
eb735ef
f305245
68c163d
d92996e
0587c27
353f722
899d547
6bd93ac
a6491dd
fc29c7f
d61fa45
e582910
fbfc1b1
2bd7e2b
cf45bb3
19fa7e1
5c564c2
2b5c2aa
3eb8f01
6462da6
4b89dbf
c890574
592c81b
07523f3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
*/ | ||
|
||
export { | ||
SEARCH_SESSION_TYPE, | ||
ENHANCED_ES_SEARCH_STRATEGY, | ||
EQL_SEARCH_STRATEGY, | ||
EqlRequestParams, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,8 @@ export const configSchema = schema.object({ | |
enabled: schema.boolean({ defaultValue: false }), | ||
pageSize: schema.number({ defaultValue: 10000 }), | ||
trackingInterval: schema.duration({ defaultValue: '10s' }), | ||
inMemTimeout: schema.duration({ defaultValue: '1m' }), | ||
completedTimeout: schema.duration({ defaultValue: '5m' }), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to confirm I understand correctly: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep. Bingo. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, to clarify - the timeout is from the creation time. |
||
notTouchedTimeout: schema.duration({ defaultValue: '1m' }), | ||
maxUpdateRetries: schema.number({ defaultValue: 3 }), | ||
defaultExpiration: schema.duration({ defaultValue: '7d' }), | ||
management: schema.object({ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
*/ | ||
|
||
import { CoreSetup, CoreStart, Logger, Plugin, PluginInitializerContext } from 'kibana/server'; | ||
import { Observable } from 'rxjs'; | ||
import { TaskManagerSetupContract, TaskManagerStartContract } from '../../task_manager/server'; | ||
import { | ||
PluginSetup as DataPluginSetup, | ||
|
@@ -22,6 +23,7 @@ import { | |
} from './search'; | ||
import { getUiSettings } from './ui_settings'; | ||
import type { DataEnhancedRequestHandlerContext } from './type'; | ||
import { ConfigSchema } from '../config'; | ||
|
||
interface SetupDependencies { | ||
data: DataPluginSetup; | ||
|
@@ -37,9 +39,11 @@ export class EnhancedDataServerPlugin | |
implements Plugin<void, void, SetupDependencies, StartDependencies> { | ||
private readonly logger: Logger; | ||
private sessionService!: SearchSessionService; | ||
private config$: Observable<ConfigSchema>; | ||
|
||
constructor(private initializerContext: PluginInitializerContext) { | ||
constructor(private initializerContext: PluginInitializerContext<ConfigSchema>) { | ||
this.logger = initializerContext.logger.get('data_enhanced'); | ||
this.config$ = this.initializerContext.config.create(); | ||
} | ||
|
||
public setup(core: CoreSetup<DataPluginStart>, deps: SetupDependencies) { | ||
|
@@ -51,6 +55,7 @@ export class EnhancedDataServerPlugin | |
deps.data.search.registerSearchStrategy( | ||
ENHANCED_ES_SEARCH_STRATEGY, | ||
enhancedEsSearchStrategyProvider( | ||
this.config$, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just FYI, config is available synchronously: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm going to make a small separate PR out of this change There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
this.initializerContext.config.legacy.globalConfig$, | ||
this.logger, | ||
usage | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need an explicit
touched
property or can we just go by theupdated_at
which every saved object already has?