Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Add [email protected] library #16

Merged
merged 1 commit into from
Apr 9, 2020

Conversation

koorosh
Copy link
Contributor

@koorosh koorosh commented Feb 4, 2020

No description provided.

@koorosh koorosh force-pushed the koorosh/ui-storybook-integration branch from e80bc79 to 5a6c955 Compare April 8, 2020 16:12
@dhartunian dhartunian merged commit b061d50 into master Apr 9, 2020
@dhartunian dhartunian deleted the koorosh/ui-storybook-integration branch April 9, 2020 20:38
craig bot pushed a commit to cockroachdb/cockroach that referenced this pull request Apr 9, 2020
44680: ui: Add Storybook to the project r=dhartunian a=koorosh

Depends on: cockroachdb/yarn-vendored#16

- .storybook directory contains custom Storybook and Webpack configurations
- Added Badge stories as a working example
- "antd/es/tooltip/style/css" styles has been moved to the App component
because they apply globally.
- stick to the exact [email protected] version because of incompatibility with
babel-polyfill versions in latest versions of storybook.

47247: kv: don't mix prefix and non-prefix iters when collecting intents r=nvanbenschoten a=nvanbenschoten

Fixes #47219.

This commit addresses the bug diagnosed and explained in #47219. In that issue, we saw an assertion failure all the way up in the concurrency manager because a `READ_UNCOMMITTED` scan was hitting a `WriteIntentError`, which should not be possible. The root cause of this issue was that `READ_UNCOMMITTED` scans were mixing prefix and non-prefix iterators pulled from a read-only engine between the time that they were collecting intent keys and they were returning to fetch the provisional values for those keys. This mixing of iterators did not guarantee that the two stages of the operation would observe a consistent snapshot of the underlying engine, and because the `READ_UNCOMMITTED` scans also did not acquire latches, writes were able to slip in and change the intent while the scan wasn't looking. This caused the scan to throw a `WriteIntentError` for the new intent transaction, which badly confused other parts of the system (rightfully so).

This commit fixes this issue in a few different ways:
1. it ensures that we always use the same iterator type (prefix or non-prefix) when retrieving the provisional values for a collection of intents retrieved by an earlier scan during `READ_UNCOMMITTED` operations.
2. it adds an assertion inside of `batcheval.CollectIntentRows` that the function never returns a `WriteIntentError`. This would have caught the bug much more easily, especially back before we had the concurrency manager assertion and this bug could have materialized as stuck range lookups and potentially even deadlocked splits due to the dependency cycle between those two operations.
3. it documents the limited guarantees that read-only engines provide with respect to consistent engine snapshots across iterator instances.

We'll want to backport this fix as far back as possible. It won't crash earlier releases of Cockroach, but as stated above, it might cause even more disastrous results. REMINDER: when backporting, remember to change the release note.

Release notes (bug fix): a bug that could cause Cockroach processes to crash due to an assertion failure with the text "expected latches held, found none" has been fixed.

Release justification: fixes a high-priority bug in existing functionality. The bug became louder (now crashes servers) due to recent changes that added new assertions into the code.

Co-authored-by: Andrii Vorobiov <[email protected]>
Co-authored-by: Nathan VanBenschoten <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants