-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
caching or versioning problem with multiple Kibana instances #7055
Comments
…dex pattern Former-commit-id: e2b7aea
…dex pattern Former-commit-id: 4cad856
#21947 fixes the issue for We still have the issue on other saved object types. |
Pinging @elastic/kibana-operations (Team:Operations) |
@LeeDr is this still valid, or can we close? If it's still valid we should move to the Core team. |
I think this is still valid. Here's another example;
Concrete example with eCommerce sample data
In these cases, user 2 doesn't have any idea that they are working from a stale version of the visualization and overwriting other changes. It could even be multiple different changes that get overwritten. Compared to the case of index-patterns (data views), when you try to save a change to a stale version the UI tells you that you have to refresh (and re-do your changes) before saving. |
Reading through the issue, I don't even think this is a core thing. I think that each application will need to figure out how to handle this. I do know that the saved objects have the ability to track the version so they can prevent a write if the underlying value originally read changed... Which is what I think is happening here. |
Pinging @elastic/kibana-core (Team:Core) |
Reassigning to core, didn't realize they owned Advanced Settings. This feels like an advanced settings specific bug. |
I wonder if we can use the documents |
We're doing that already. We're using the Problem with the uiSettings is more that it's an higher level API and the SO APIs are just the underlying implementation, so there isn't an easy way to keep track of the version of the Looking at the issue's description, it may be more that we're updating more settings than necessary when saving in the advanced settings page?
I would expect the second save operation on instance 1 to only update the setting(s) that were not previously saved (e.g here, only Actually I thought we were already doing that. Given this is an issue from 2016, it's probably worth checking that this isn't fixed already. regarding the second use case from @LeeDr in #7055 (comment)
The SO apis already allow consumers to pass a e.g for kibana/src/core/server/saved_objects/service/saved_objects_client.ts Lines 223 to 225 in 1ca8771
And this kibana/src/core/types/saved_objects.ts Lines 69 to 75 in 1965315
it's just that our API consumers are almost never using it. |
Based on Pierre's comment, I've changed the labels to UI Settings as it seems that SO APIs allow the concurrency checks as long as |
Pinging @elastic/appex-sharedux (Team:SharedUX) |
Not sure why it was assigned to Shared UX, but reading through the issue it looks to me that the behaviour is actually expected. If an app wants to prevent this behaviour, there is an option to do optimistic concurrency control (conditional updates). |
`v86.0.0`⏩`v87.1.0`⚠️ The biggest set of type changes in this PR come from the breaking change that makes `pageSize` and `pageSizeOptions` now optional props for `EuiBasicTable.pagination`, `EuiInMemoryTable.pagination` and `EuiDataGrid.pagination`. This caused several other components that were cloning EUI's pagination type to start throwing type warnings about `pageSize` being optional. Where I came across these errors, I modified the extended types to require `pageSize`. These types and their usages may end up changing again in any case once the Shared UX team looks into #56406. --- ## [`87.1.0`](https://github.com/elastic/eui/tree/v87.1.0) - Updated the underlying library powering `EuiAutoSizer`. This primarily affects typing around the `disableHeight` and `disableWidth` props ([#6798](elastic/eui#6798)) - Added new `EuiAutoSize`, `EuiAutoSizeHorizontal`, and `EuiAutoSizeVertical` types to support `EuiAutoSizer`'s now-stricter typing ([#6798](elastic/eui#6798)) - Updated `EuiDatePickerRange` to support `compressed` display ([#7058](elastic/eui#7058)) - Updated `EuiFlyoutBody` with a new `scrollableTabIndex` prop ([#7061](elastic/eui#7061)) - Added a new `panelMinWidth` prop to `EuiInputPopover` ([#7071](elastic/eui#7071)) - Added a new `inputPopoverProps` prop for `EuiRange`s and `EuiDualRange`s with `showInput="inputWithPopover"` set ([#7082](elastic/eui#7082)) **Bug fixes** - Fixed `EuiToolTip` overriding instead of merging its `aria-describedby` tooltip ID with any existing `aria-describedby`s ([#7055](elastic/eui#7055)) - Fixed `EuiSuperDatePicker`'s `compressed` display ([#7058](elastic/eui#7058)) - Fixed `EuiAccordion` to remove tabbable children from sequential keyboard navigation when the accordion is closed ([#7064](elastic/eui#7064)) - Fixed `EuiFlyout`s to accept custom `aria-describedby` IDs ([#7065](elastic/eui#7065)) **Accessibility** - Removed the default `dialog` role and `tabIndex` from push `EuiFlyout`s. Push flyouts, compared to overlay flyouts, require manual accessibility management. ([#7065](elastic/eui#7065)) ## [`87.0.0`](https://github.com/elastic/eui/tree/v87.0.0) - Added beta `componentDefaults` prop to `EuiProvider`, which will allow configuring certain default props globally. This list of components and defaults is still under consideration. ([#6923](elastic/eui#6923)) - `EuiPortal`'s `insert` prop can now be configured globally via `EuiProvider.componentDefaults` ([#6941](elastic/eui#6941)) - `EuiFocusTrap`'s `crossFrame` and `gapMode` props can now be configured globally via `EuiProvider.componentDefaults` ([#6942](elastic/eui#6942)) - `EuiTablePagination`'s `itemsPerPage`, `itemsPerPageOptions`, and `showPerPageOptions` props can now be configured globally via `EuiProvider.componentDefaults` ([#6951](elastic/eui#6951)) - `EuiBasicTable`, `EuiInMemoryTable`, and `EuiDataGrid` now allow `pagination.pageSize` to be undefined. If undefined, `pageSize` defaults to `EuiTablePagination`'s `itemsPerPage` component default. ([#6993](elastic/eui#6993)) - `EuiBasicTable`, `EuiInMemoryTable`, and `EuiDataGrid`'s `pagination.pageSizeOptions` will now fall back to `EuiTablePagination`'s `itemsPerPageOptions` component default. ([#6993](elastic/eui#6993)) - Updated `EuiHeaderLinks`'s `gutterSize` spacings ([#7005](elastic/eui#7005)) - Updated `EuiHeaderAlert`'s stacking styles ([#7005](elastic/eui#7005)) - Added `toolTipProps` to `EuiListGroupItem` that allows customizing item tooltips. ([#7018](elastic/eui#7018)) - Updated `EuiBreadcrumbs` to support breadcrumbs that toggle popovers via `popoverContent` and `popoverProps` ([#7031](elastic/eui#7031)) - Improved the contrast ratio of disabled titles within `EuiSteps` and `EuiStepsHorizontal` to meet WCAG AA guidelines. ([#7032](elastic/eui#7032)) - Updated `EuiSteps` and `EuiStepsHorizontal` to highlight and provide a more clear visual indication of the current step ([#7048](elastic/eui#7048)) **Bug fixes** - Single uses of `<EuiHeaderSectionItem side="right" />` now align right as expected without needing a previous `side="left"` sibling. ([#7005](elastic/eui#7005)) - `EuiPageTemplate` now correctly displays `panelled={true}` ([#7044](elastic/eui#7044)) **Breaking changes** - `EuiTablePagination`'s default `itemsPerPage` is now `10` (was previously `50`). This can be configured through `EuiProvider.componentDefaults`. ([#6993](elastic/eui#6993)) - `EuiTablePagination`'s default `itemsPerPageOptions` is now `[10, 25, 50]` (was previously `[10, 20, 50, 100]`). This can be configured through `EuiProvider.componentDefaults`. ([#6993](elastic/eui#6993)) - Removed `border` prop from `EuiHeaderSectionItem` (unused since Amsterdam theme) ([#7005](elastic/eui#7005)) - Removed `borders` object configuration from `EuiHeader.sections` ([#7005](elastic/eui#7005)) **CSS-in-JS conversions** - Converted `EuiHeaderAlert` to Emotion; Removed unused `.euiHeaderAlert__dismiss` CSS ([#7005](elastic/eui#7005)) - Converted `EuiHeaderSection`, `EuiHeaderSectionItem`, and `EuiHeaderSectionItemButton` to Emotion ([#7005](elastic/eui#7005)) - Converted `EuiHeaderLinks` and `EuiHeaderLink` to Emotion; Removed `$euiHeaderLinksGutterSizes` Sass variables ([#7005](elastic/eui#7005)) - Removed `$euiHeaderBackgroundColor` Sass variable; use `$euiColorEmptyShade` instead ([#7005](elastic/eui#7005)) - Removed `$euiHeaderChildSize` Sass variable; use `$euiSizeXXL` instead ([#7005](elastic/eui#7005)) --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Patryk Kopyciński <contact@patrykkopycinski.com>
If you have 2 or more instances of Kibana sharing the same .kibana index, they can clobber each other's changes with values they have in cache.
To Reproduce;
#1
on port 5601 and#2
on port 5602 on the same machine.#1
change discover:sampleSize (Default: 500) to 499#2
change discover:sampleSize (Default: 500) to 501#1
change courier:maxSegmentCount (Default: 30) to 29Expected discover:sampleSize (Default: 500) to be 501 since it was the last change made to that setting.
Actual discover:sampleSize (Default: 500) to 499 (probably because
#1
had 499 cached when it wrote the courier:maxSegmentCount so it wrote the whole config object)If possible, it should know the version of the config object it has cached.
When it tries to write the object it should check the version first and, if later, show the user an error if it is a later version, and refresh the page to show the current version. The user can try to save again, or has to make their change again and save again.
OR
When it tries to write the object it should check the version first and, if later, get the latest version and re-apply the change and try to save it again (again checking the version).
OR
When it tries to write the object the write should include the next version and fail if that version already exist in Elasticsearch? Not sure which of these functionalities is possible. Then handle the error by getting the latest version, and re-applying the change. This could be the best performing solution because it only takes one round-trip in most cases.
The text was updated successfully, but these errors were encountered: