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
Lock dimension slices when creating new chunk #2800
Merged
erimatnor
merged 1 commit into
timescale:1.7.x
from
erimatnor:backport-lock-dimension-slices
Jan 13, 2021
Merged
Lock dimension slices when creating new chunk #2800
erimatnor
merged 1 commit into
timescale:1.7.x
from
erimatnor:backport-lock-dimension-slices
Jan 13, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change makes two changes to address issues with processes doing concurrent inserts and `drop_chunks` calls: - When a new chunk is created, any dimension slices that existed prior to creating the new chunk are locked to prevent them from being dropped before the chunk-creating process commits. - When a chunk is being dropped, concurrent inserts into the chunk that is being dropped will try to lock the dimension slices of the chunk. In case the locking fails (due to the slices being concurrently deleted), the insert process will treat the chunk as not existing and will instead recreate it. Previously, the chunk slices (and thus chunk) would be found, but the insert would fail when committing since the chunk was concurrently deleted. A prior commit (PR timescale#2150) partially solved a related problem, but didn't lock all the slices of a chunk. That commit also threw an error when a lock on a slice could not be taken due to the slice being deleted by another transaction. This is now changed to treat that case as a missing slice instead, causing it to be recreated. Fixes timescale#1986
pmwkaa
approved these changes
Jan 11, 2021
mkindahl
approved these changes
Jan 13, 2021
mkindahl
added a commit
to mkindahl/timescaledb
that referenced
this pull request
Jan 13, 2021
This is a backport of timescale#2558. In timescale#2800 a a race condition between inserts and `drop_chunks` is fixed and this commit will repair the dimension slices table by re-constructing missing dimension slices from the corresponding constraint expressions. Closes timescale#1986
mkindahl
added a commit
to mkindahl/timescaledb
that referenced
this pull request
Jan 13, 2021
This is a backport of timescale#2558. In timescale#2800 a a race condition between inserts and `drop_chunks` is fixed and this commit will repair the dimension slices table by re-constructing missing dimension slices from the corresponding constraint expressions.
k-rus
added a commit
to k-rus/timescaledb
that referenced
this pull request
Feb 11, 2021
This maintenance release contains bugfixes since the 1.7.4 release. The most of the fixes were ported from 2.0.0 and 2.0.1 releases. We deem it high priority for upgrading for users on 1.7.4 or previous versions. In particular the fixes contained in this maintenance release address issues in continuous aggregates, compression, JOINs with hypertables and when upgrading from previous versions. **Bugfixes** * timescale#2502 Replace check function when updating * timescale#2558 Repair dimension slice table on update * timescale#2619 Fix segfault in decompress_chunk for chunks with dropped columns * timescale#2664 Fix support for complex aggregate expression * timescale#2800 Lock dimension slices when creating new chunk * timescale#2860 Fix projection in ChunkAppend nodes * timescale#2865 Apply volatile function quals at decompresschunk * timescale#2851 Fix nested loop joins that involve compressed chunks * timescale#2868 Fix corruption in gapfill plan * timescale#2883 Fix join qual propagation for nested joins * timescale#2885 Fix compressed chunk check when disabling compression * timescale#2920 Fix repair in update scripts **Thanks** * @akamensky for reporting several issues including segfaults after version update * @alex88 for reporting an issue with joined hypertables * @dhodyn for reporting an issue when joining compressed chunks * @diego-hermida for reporting an issue with disabling compression * @Netskeh for reporting bug on time_bucket problem in continuous aggregates * @WarriorOfWire for reporting the bug with gapfill queries not being able to find pathkey item to sort * @zeeshanshabbir93 for reporting an issue with joins
Merged
k-rus
added a commit
to k-rus/timescaledb
that referenced
this pull request
Feb 12, 2021
This maintenance release contains bugfixes since the 1.7.4 release. Most of these fixes were backported from the 2.0.0 and 2.0.1 releases. We deem it high priority for upgrading for users on TimescaleDB 1.7.4 or previous versions. In particular the fixes contained in this maintenance release address issues in continuous aggregates, compression, JOINs with hypertables, and when upgrading from previous versions. **Bugfixes** * timescale#2502 Replace check function when updating * timescale#2558 Repair dimension slice table on update * timescale#2619 Fix segfault in decompress_chunk for chunks with dropped columns * timescale#2664 Fix support for complex aggregate expression * timescale#2800 Lock dimension slices when creating new chunk * timescale#2860 Fix projection in ChunkAppend nodes * timescale#2865 Apply volatile function quals at decompresschunk * timescale#2851 Fix nested loop joins that involve compressed chunks * timescale#2868 Fix corruption in gapfill plan * timescale#2883 Fix join qual propagation for nested joins * timescale#2885 Fix compressed chunk check when disabling compression * timescale#2920 Fix repair in update scripts **Thanks** * @akamensky for reporting several issues including segfaults after version update * @alex88 for reporting an issue with joined hypertables * @dhodyn for reporting an issue when joining compressed chunks * @diego-hermida for reporting an issue with disabling compression * @Netskeh for reporting bug on time_bucket problem in continuous aggregates * @WarriorOfWire for reporting the bug with gapfill queries not being able to find pathkey item to sort * @zeeshanshabbir93 for reporting an issue with joins
k-rus
added a commit
to k-rus/timescaledb
that referenced
this pull request
Feb 12, 2021
This maintenance release contains bugfixes since the 1.7.4 release. Most of these fixes were backported from the 2.0.0 and 2.0.1 releases. We deem it high priority for upgrading for users on TimescaleDB 1.7.4 or previous versions. In particular the fixes contained in this maintenance release address issues in continuous aggregates, compression, JOINs with hypertables, and when upgrading from previous versions. **Bugfixes** * timescale#2502 Replace check function when updating * timescale#2558 Repair dimension slice table on update * timescale#2619 Fix segfault in decompress_chunk for chunks with dropped columns * timescale#2664 Fix support for complex aggregate expression * timescale#2800 Lock dimension slices when creating new chunk * timescale#2860 Fix projection in ChunkAppend nodes * timescale#2865 Apply volatile function quals at decompresschunk * timescale#2851 Fix nested loop joins that involve compressed chunks * timescale#2868 Fix corruption in gapfill plan * timescale#2883 Fix join qual propagation for nested joins * timescale#2885 Fix compressed chunk check when disabling compression * timescale#2920 Fix repair in update scripts **Thanks** * @akamensky for reporting several issues including segfaults after version update * @alex88 for reporting an issue with joined hypertables * @dhodyn for reporting an issue when joining compressed chunks * @diego-hermida for reporting an issue with disabling compression * @Netskeh for reporting bug on time_bucket problem in continuous aggregates * @WarriorOfWire for reporting the bug with gapfill queries not being able to find pathkey item to sort * @zeeshanshabbir93 for reporting an issue with joins
k-rus
added a commit
that referenced
this pull request
Feb 12, 2021
This maintenance release contains bugfixes since the 1.7.4 release. Most of these fixes were backported from the 2.0.0 and 2.0.1 releases. We deem it high priority for upgrading for users on TimescaleDB 1.7.4 or previous versions. In particular the fixes contained in this maintenance release address issues in continuous aggregates, compression, JOINs with hypertables, and when upgrading from previous versions. **Bugfixes** * #2502 Replace check function when updating * #2558 Repair dimension slice table on update * #2619 Fix segfault in decompress_chunk for chunks with dropped columns * #2664 Fix support for complex aggregate expression * #2800 Lock dimension slices when creating new chunk * #2860 Fix projection in ChunkAppend nodes * #2865 Apply volatile function quals at decompresschunk * #2851 Fix nested loop joins that involve compressed chunks * #2868 Fix corruption in gapfill plan * #2883 Fix join qual propagation for nested joins * #2885 Fix compressed chunk check when disabling compression * #2920 Fix repair in update scripts **Thanks** * @akamensky for reporting several issues including segfaults after version update * @alex88 for reporting an issue with joined hypertables * @dhodyn for reporting an issue when joining compressed chunks * @diego-hermida for reporting an issue with disabling compression * @Netskeh for reporting bug on time_bucket problem in continuous aggregates * @WarriorOfWire for reporting the bug with gapfill queries not being able to find pathkey item to sort * @zeeshanshabbir93 for reporting an issue with joins
k-rus
added a commit
that referenced
this pull request
Feb 12, 2021
This maintenance release contains bugfixes since the 1.7.4 release. Most of these fixes were backported from the 2.0.0 and 2.0.1 releases. We deem it high priority for upgrading for users on TimescaleDB 1.7.4 or previous versions. In particular the fixes contained in this maintenance release address issues in continuous aggregates, compression, JOINs with hypertables, and when upgrading from previous versions. **Bugfixes** * #2502 Replace check function when updating * #2558 Repair dimension slice table on update * #2619 Fix segfault in decompress_chunk for chunks with dropped columns * #2664 Fix support for complex aggregate expression * #2800 Lock dimension slices when creating new chunk * #2860 Fix projection in ChunkAppend nodes * #2865 Apply volatile function quals at decompresschunk * #2851 Fix nested loop joins that involve compressed chunks * #2868 Fix corruption in gapfill plan * #2883 Fix join qual propagation for nested joins * #2885 Fix compressed chunk check when disabling compression * #2920 Fix repair in update scripts **Thanks** * @akamensky for reporting several issues including segfaults after version update * @alex88 for reporting an issue with joined hypertables * @dhodyn for reporting an issue when joining compressed chunks * @diego-hermida for reporting an issue with disabling compression * @Netskeh for reporting bug on time_bucket problem in continuous aggregates * @WarriorOfWire for reporting the bug with gapfill queries not being able to find pathkey item to sort * @zeeshanshabbir93 for reporting an issue with joins
k-rus
added a commit
that referenced
this pull request
Feb 12, 2021
This maintenance release contains bugfixes since the 1.7.4 release. Most of these fixes were backported from the 2.0.0 and 2.0.1 releases. We deem it high priority for upgrading for users on TimescaleDB 1.7.4 or previous versions. In particular the fixes contained in this maintenance release address issues in continuous aggregates, compression, JOINs with hypertables, and when upgrading from previous versions. **Bugfixes** * #2502 Replace check function when updating * #2558 Repair dimension slice table on update * #2619 Fix segfault in decompress_chunk for chunks with dropped columns * #2664 Fix support for complex aggregate expression * #2800 Lock dimension slices when creating new chunk * #2860 Fix projection in ChunkAppend nodes * #2865 Apply volatile function quals at decompresschunk * #2851 Fix nested loop joins that involve compressed chunks * #2868 Fix corruption in gapfill plan * #2883 Fix join qual propagation for nested joins * #2885 Fix compressed chunk check when disabling compression * #2920 Fix repair in update scripts **Thanks** * @akamensky for reporting several issues including segfaults after version update * @alex88 for reporting an issue with joined hypertables * @dhodyn for reporting an issue when joining compressed chunks * @diego-hermida for reporting an issue with disabling compression * @Netskeh for reporting bug on time_bucket problem in continuous aggregates * @WarriorOfWire for reporting the bug with gapfill queries not being able to find pathkey item to sort * @zeeshanshabbir93 for reporting an issue with joins
k-rus
added a commit
that referenced
this pull request
Feb 12, 2021
This maintenance release contains bugfixes since the 1.7.4 release. Most of these fixes were backported from the 2.0.0 and 2.0.1 releases. We deem it high priority for upgrading for users on TimescaleDB 1.7.4 or previous versions. In particular the fixes contained in this maintenance release address issues in continuous aggregates, compression, JOINs with hypertables, and when upgrading from previous versions. **Bugfixes** * #2502 Replace check function when updating * #2558 Repair dimension slice table on update * #2619 Fix segfault in decompress_chunk for chunks with dropped columns * #2664 Fix support for complex aggregate expression * #2800 Lock dimension slices when creating new chunk * #2860 Fix projection in ChunkAppend nodes * #2865 Apply volatile function quals at decompresschunk * #2851 Fix nested loop joins that involve compressed chunks * #2868 Fix corruption in gapfill plan * #2883 Fix join qual propagation for nested joins * #2885 Fix compressed chunk check when disabling compression * #2920 Fix repair in update scripts **Thanks** * @akamensky for reporting several issues including segfaults after version update * @alex88 for reporting an issue with joined hypertables * @dhodyn for reporting an issue when joining compressed chunks * @diego-hermida for reporting an issue with disabling compression * @Netskeh for reporting bug on time_bucket problem in continuous aggregates * @WarriorOfWire for reporting the bug with gapfill queries not being able to find pathkey item to sort * @zeeshanshabbir93 for reporting an issue with joins
Merged
k-rus
added a commit
that referenced
this pull request
Feb 12, 2021
This maintenance release contains bugfixes since the 1.7.4 release. Most of these fixes were backported from the 2.0.0 and 2.0.1 releases. We deem it high priority for upgrading for users on TimescaleDB 1.7.4 or previous versions. In particular the fixes contained in this maintenance release address issues in continuous aggregates, compression, JOINs with hypertables, and when upgrading from previous versions. **Bugfixes** * #2502 Replace check function when updating * #2558 Repair dimension slice table on update * #2619 Fix segfault in decompress_chunk for chunks with dropped columns * #2664 Fix support for complex aggregate expression * #2800 Lock dimension slices when creating new chunk * #2860 Fix projection in ChunkAppend nodes * #2865 Apply volatile function quals at decompresschunk * #2851 Fix nested loop joins that involve compressed chunks * #2868 Fix corruption in gapfill plan * #2883 Fix join qual propagation for nested joins * #2885 Fix compressed chunk check when disabling compression * #2920 Fix repair in update scripts **Thanks** * @akamensky for reporting several issues including segfaults after version update * @alex88 for reporting an issue with joined hypertables * @dhodyn for reporting an issue when joining compressed chunks * @diego-hermida for reporting an issue with disabling compression * @Netskeh for reporting bug on time_bucket problem in continuous aggregates * @WarriorOfWire for reporting the bug with gapfill queries not being able to find pathkey item to sort * @zeeshanshabbir93 for reporting an issue with joins
pmwkaa
pushed a commit
that referenced
this pull request
Feb 16, 2021
This maintenance release contains bugfixes since the 1.7.4 release. Most of these fixes were backported from the 2.0.0 and 2.0.1 releases. We deem it high priority for upgrading for users on TimescaleDB 1.7.4 or previous versions. In particular the fixes contained in this maintenance release address issues in continuous aggregates, compression, JOINs with hypertables, and when upgrading from previous versions. **Bugfixes** * #2502 Replace check function when updating * #2558 Repair dimension slice table on update * #2619 Fix segfault in decompress_chunk for chunks with dropped columns * #2664 Fix support for complex aggregate expression * #2800 Lock dimension slices when creating new chunk * #2860 Fix projection in ChunkAppend nodes * #2865 Apply volatile function quals at decompresschunk * #2851 Fix nested loop joins that involve compressed chunks * #2868 Fix corruption in gapfill plan * #2883 Fix join qual propagation for nested joins * #2885 Fix compressed chunk check when disabling compression * #2920 Fix repair in update scripts **Thanks** * @akamensky for reporting several issues including segfaults after version update * @alex88 for reporting an issue with joined hypertables * @dhodyn for reporting an issue when joining compressed chunks * @diego-hermida for reporting an issue with disabling compression * @Netskeh for reporting bug on time_bucket problem in continuous aggregates * @WarriorOfWire for reporting the bug with gapfill queries not being able to find pathkey item to sort * @zeeshanshabbir93 for reporting an issue with joins
pmwkaa
pushed a commit
that referenced
this pull request
Feb 16, 2021
This maintenance release contains bugfixes since the 1.7.4 release. Most of these fixes were backported from the 2.0.0 and 2.0.1 releases. We deem it high priority for upgrading for users on TimescaleDB 1.7.4 or previous versions. In particular the fixes contained in this maintenance release address issues in continuous aggregates, compression, JOINs with hypertables, and when upgrading from previous versions. **Bugfixes** * #2502 Replace check function when updating * #2558 Repair dimension slice table on update * #2619 Fix segfault in decompress_chunk for chunks with dropped columns * #2664 Fix support for complex aggregate expression * #2800 Lock dimension slices when creating new chunk * #2860 Fix projection in ChunkAppend nodes * #2865 Apply volatile function quals at decompresschunk * #2851 Fix nested loop joins that involve compressed chunks * #2868 Fix corruption in gapfill plan * #2883 Fix join qual propagation for nested joins * #2885 Fix compressed chunk check when disabling compression * #2920 Fix repair in update scripts **Thanks** * @akamensky for reporting several issues including segfaults after version update * @alex88 for reporting an issue with joined hypertables * @dhodyn for reporting an issue when joining compressed chunks * @diego-hermida for reporting an issue with disabling compression * @Netskeh for reporting bug on time_bucket problem in continuous aggregates * @WarriorOfWire for reporting the bug with gapfill queries not being able to find pathkey item to sort * @zeeshanshabbir93 for reporting an issue with joins
pmwkaa
pushed a commit
that referenced
this pull request
Feb 16, 2021
This maintenance release contains bugfixes since the 1.7.4 release. Most of these fixes were backported from the 2.0.0 and 2.0.1 releases. We deem it high priority for upgrading for users on TimescaleDB 1.7.4 or previous versions. In particular the fixes contained in this maintenance release address issues in continuous aggregates, compression, JOINs with hypertables, and when upgrading from previous versions. **Bugfixes** * #2502 Replace check function when updating * #2558 Repair dimension slice table on update * #2619 Fix segfault in decompress_chunk for chunks with dropped columns * #2664 Fix support for complex aggregate expression * #2800 Lock dimension slices when creating new chunk * #2860 Fix projection in ChunkAppend nodes * #2865 Apply volatile function quals at decompresschunk * #2851 Fix nested loop joins that involve compressed chunks * #2868 Fix corruption in gapfill plan * #2883 Fix join qual propagation for nested joins * #2885 Fix compressed chunk check when disabling compression * #2920 Fix repair in update scripts **Thanks** * @akamensky for reporting several issues including segfaults after version update * @alex88 for reporting an issue with joined hypertables * @dhodyn for reporting an issue when joining compressed chunks * @diego-hermida for reporting an issue with disabling compression * @Netskeh for reporting bug on time_bucket problem in continuous aggregates * @WarriorOfWire for reporting the bug with gapfill queries not being able to find pathkey item to sort * @zeeshanshabbir93 for reporting an issue with joins
erimatnor
pushed a commit
to erimatnor/timescaledb
that referenced
this pull request
Feb 18, 2021
This maintenance release contains bugfixes since the 1.7.4 release. Most of these fixes were backported from the 2.0.0 and 2.0.1 releases. We deem it high priority for upgrading for users on TimescaleDB 1.7.4 or previous versions. In particular the fixes contained in this maintenance release address issues in continuous aggregates, compression, JOINs with hypertables, and when upgrading from previous versions. **Bugfixes** * timescale#2502 Replace check function when updating * timescale#2558 Repair dimension slice table on update * timescale#2619 Fix segfault in decompress_chunk for chunks with dropped columns * timescale#2664 Fix support for complex aggregate expression * timescale#2800 Lock dimension slices when creating new chunk * timescale#2860 Fix projection in ChunkAppend nodes * timescale#2865 Apply volatile function quals at decompresschunk * timescale#2851 Fix nested loop joins that involve compressed chunks * timescale#2868 Fix corruption in gapfill plan * timescale#2883 Fix join qual propagation for nested joins * timescale#2885 Fix compressed chunk check when disabling compression * timescale#2920 Fix repair in update scripts **Thanks** * @akamensky for reporting several issues including segfaults after version update * @alex88 for reporting an issue with joined hypertables * @dhodyn for reporting an issue when joining compressed chunks * @diego-hermida for reporting an issue with disabling compression * @Netskeh for reporting bug on time_bucket problem in continuous aggregates * @WarriorOfWire for reporting the bug with gapfill queries not being able to find pathkey item to sort * @zeeshanshabbir93 for reporting an issue with joins
erimatnor
pushed a commit
to erimatnor/timescaledb
that referenced
this pull request
Feb 19, 2021
This maintenance release contains bugfixes since the 1.7.4 release. Most of these fixes were backported from the 2.0.0 and 2.0.1 releases. We deem it high priority for upgrading for users on TimescaleDB 1.7.4 or previous versions. In particular the fixes contained in this maintenance release address issues in continuous aggregates, compression, JOINs with hypertables, and when upgrading from previous versions. **Bugfixes** * timescale#2502 Replace check function when updating * timescale#2558 Repair dimension slice table on update * timescale#2619 Fix segfault in decompress_chunk for chunks with dropped columns * timescale#2664 Fix support for complex aggregate expression * timescale#2800 Lock dimension slices when creating new chunk * timescale#2860 Fix projection in ChunkAppend nodes * timescale#2865 Apply volatile function quals at decompresschunk * timescale#2851 Fix nested loop joins that involve compressed chunks * timescale#2868 Fix corruption in gapfill plan * timescale#2883 Fix join qual propagation for nested joins * timescale#2885 Fix compressed chunk check when disabling compression * timescale#2920 Fix repair in update scripts **Thanks** * @akamensky for reporting several issues including segfaults after version update * @alex88 for reporting an issue with joined hypertables * @dhodyn for reporting an issue when joining compressed chunks * @diego-hermida for reporting an issue with disabling compression * @Netskeh for reporting bug on time_bucket problem in continuous aggregates * @WarriorOfWire for reporting the bug with gapfill queries not being able to find pathkey item to sort * @zeeshanshabbir93 for reporting an issue with joins
erimatnor
pushed a commit
to erimatnor/timescaledb
that referenced
this pull request
Feb 19, 2021
This maintenance release contains bugfixes since the 1.7.4 release. Most of these fixes were backported from the 2.0.0 and 2.0.1 releases. We deem it high priority for upgrading for users on TimescaleDB 1.7.4 or previous versions. In particular the fixes contained in this maintenance release address issues in continuous aggregates, compression, JOINs with hypertables, and when upgrading from previous versions. **Bugfixes** * timescale#2502 Replace check function when updating * timescale#2558 Repair dimension slice table on update * timescale#2619 Fix segfault in decompress_chunk for chunks with dropped columns * timescale#2664 Fix support for complex aggregate expression * timescale#2800 Lock dimension slices when creating new chunk * timescale#2860 Fix projection in ChunkAppend nodes * timescale#2865 Apply volatile function quals at decompresschunk * timescale#2851 Fix nested loop joins that involve compressed chunks * timescale#2868 Fix corruption in gapfill plan * timescale#2883 Fix join qual propagation for nested joins * timescale#2885 Fix compressed chunk check when disabling compression * timescale#2920 Fix repair in update scripts **Thanks** * @akamensky for reporting several issues including segfaults after version update * @alex88 for reporting an issue with joined hypertables * @dhodyn for reporting an issue when joining compressed chunks * @diego-hermida for reporting an issue with disabling compression * @Netskeh for reporting bug on time_bucket problem in continuous aggregates * @WarriorOfWire for reporting the bug with gapfill queries not being able to find pathkey item to sort * @zeeshanshabbir93 for reporting an issue with joins
erimatnor
pushed a commit
that referenced
this pull request
Feb 19, 2021
This maintenance release contains bugfixes since the 1.7.4 release. Most of these fixes were backported from the 2.0.0 and 2.0.1 releases. We deem it high priority for upgrading for users on TimescaleDB 1.7.4 or previous versions. In particular the fixes contained in this maintenance release address issues in continuous aggregates, compression, JOINs with hypertables, and when upgrading from previous versions. **Bugfixes** * #2502 Replace check function when updating * #2558 Repair dimension slice table on update * #2619 Fix segfault in decompress_chunk for chunks with dropped columns * #2664 Fix support for complex aggregate expression * #2800 Lock dimension slices when creating new chunk * #2860 Fix projection in ChunkAppend nodes * #2865 Apply volatile function quals at decompresschunk * #2851 Fix nested loop joins that involve compressed chunks * #2868 Fix corruption in gapfill plan * #2883 Fix join qual propagation for nested joins * #2885 Fix compressed chunk check when disabling compression * #2920 Fix repair in update scripts **Thanks** * @akamensky for reporting several issues including segfaults after version update * @alex88 for reporting an issue with joined hypertables * @dhodyn for reporting an issue when joining compressed chunks * @diego-hermida for reporting an issue with disabling compression * @Netskeh for reporting bug on time_bucket problem in continuous aggregates * @WarriorOfWire for reporting the bug with gapfill queries not being able to find pathkey item to sort * @zeeshanshabbir93 for reporting an issue with joins
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a backport of an earlier PR, now targeting 1.7.x.
This change makes two changes to address issues with processes doing
concurrent inserts and
drop_chunks
calls:When a new chunk is created, any dimension slices that existed prior
to creating the new chunk are locked to prevent them from being
dropped before the chunk-creating process commits.
When a chunk is being dropped, concurrent inserts into the chunk
that is being dropped will try to lock the dimension slices of the
chunk. In case the locking fails (due to the slices being
concurrently deleted), the insert process will treat the chunk as
not existing and will instead recreate it. Previously, the chunk
slices (and thus chunk) would be found, but the insert would fail
when committing since the chunk was concurrently deleted.
A prior commit (PR #2150) partially solved a related problem, but
didn't lock all the slices of a chunk. That commit also threw an error
when a lock on a slice could not be taken due to the slice being
deleted by another transaction. This is now changed to treat that case
as a missing slice instead, causing it to be recreated.
Fixes #1986