Skip to content
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

sql: fix various problematic uses of the txn in DistSQL flows #41307

Merged
merged 4 commits into from
Oct 5, 2019

Conversation

andreimatei
Copy link
Contributor

see individual commits

Release justification: Fixes bad bugs.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@andreimatei
Copy link
Contributor Author

I haven't made the vectorized UnorderedSync serial yet. Working on that now.

@andreimatei andreimatei force-pushed the distsql.no-concurrency branch from 84c9bef to e5e04f4 Compare October 3, 2019 23:39
@andreimatei andreimatei requested a review from a team as a code owner October 3, 2019 23:39
@andreimatei andreimatei force-pushed the distsql.no-concurrency branch 2 times, most recently from 7199e78 to 4197bef Compare October 3, 2019 23:53
@andreimatei
Copy link
Contributor Author

handled the vectorized synchronizer

Copy link
Member

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, I'm comfortable with this going into 19.2.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @andreimatei, @jordanlewis, and @RaduBerinde)


pkg/sql/distsql_running.go, line 156 at r3 (raw file):

			for nodeID, spec := range flows {
				fuseOpt := flowinfra.Normal
				if nodeID == thisNodeID && localState.IsLocal {

[nit] Doesn't the latter imply the former? Perhaps we should set this outside of the loop and assert that there is a single flow. There are a few similar instances below. Maybe we should move this into a helper function that gets the list of flows and the localstate.


pkg/sql/colexec/serial_unordered_synchronizer.go, line 23 at r3 (raw file):

// SerialUnorderedSynchronizer is an Operator that combines multiple Operator
// streams into one. It reads its inputs one by one until each one is exhausted,
// at which point it moves to the next input.

[nit] Add some context as to why it exists, maybe point at the relevant issue #s.


pkg/sql/colexec/serial_unordered_synchronizer.go, line 30 at r3 (raw file):

	curSerialInputIdx int
	zeroBatch         coldata.Batch
}

[nit] add type assertions so it's clear what interface(s) it's supposed to implement


pkg/sql/colflow/vectorized_flow.go, line 407 at r3 (raw file):

			memUsed += op.(colexec.StaticMemoryOperator).EstimateStaticMemoryUsage()
		} else {
			if opt == flowinfra.FuseAggressively {

Add a comment here, maybe point to the issue #s.


pkg/sql/distsql/server.go, line 361 at r4 (raw file):

		return nil, nil, err
	}
	if meta := req.TxnCoordMeta; meta != nil {

This block is used 3 times, should be a helper


pkg/sql/rowflow/input_sync.go, line 368 at r3 (raw file):

// makeOrderedSync creates an orderedSynchronizer. ordering dictates how rows
// are to be compared. Use sqlbase.NoOrdering to indicate that the row ordering
// doesn't matter and sources should be consumed in index order.

Add more context as to why you would want that, maybe refer to FuseAggressively.


pkg/sql/rowflow/row_based_flow.go, line 129 at r3 (raw file):

							return true
						}
					} else {

[nit] Would be more readable if we put this first under a if len(in.Streams) == 1 check (we won't need the else).


pkg/sql/rowflow/row_based_flow.go, line 154 at r3 (raw file):

	spec *execinfrapb.FlowSpec, streamID execinfrapb.StreamID,
) *execinfrapb.ProcessorSpec {
	for _, pspec := range spec.Processors {

[nit] don't copy each spec, do pspec := &spec.Processors[i]


pkg/sql/rowflow/row_based_flow.go, line 156 at r3 (raw file):

	for _, pspec := range spec.Processors {
		if len(pspec.Output) > 1 {
			return nil

Shouldn't this be continue ? (same below)


pkg/sql/rowflow/row_based_flow.go, line 276 at r3 (raw file):

				// dropped).
				streams := make([]execinfra.RowSource, len(is.Streams))
				numLocal := 0

what's numLocal for?


pkg/sql/rowflow/row_based_flow.go, line 289 at r3 (raw file):

				}
				var err error
				var ordering sqlbase.ColumnOrdering

[nit] you can do ordering := sqlbase.NoOrdering and flip theif

Copy link
Member

@jordanlewis jordanlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r1, 4 of 4 files at r2, 13 of 13 files at r3, 6 of 6 files at r4.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @andreimatei)


pkg/sql/distsql_running.go, line 353 at r4 (raw file):

	// For such flows, we were supposed to have fused everything.
	if txn != nil && planCtx.isLocal && flow.ConcurrentExecution() {
		recv.SetError(errors.Errorf(

Can you make this an "internal error"? use AssertionErrorf.


pkg/sql/colexec/serial_unordered_synchronizer.go, line 62 at r3 (raw file):

// Next is part of the Operator interface.
func (s *SerialUnorderedSynchronizer) Next(ctx context.Context) coldata.Batch {
	if ctx.Err() != nil {

This is unnecessary (I think and hope) - it's handled by the CancelChecker which is always instantiated below the scan operators.


pkg/sql/colexec/serial_unordered_synchronizer.go, line 71 at r3 (raw file):

		b := s.inputs[s.curSerialInputIdx].Next(ctx)
		if b.Length() == 0 {
			s.curSerialInputIdx++

I won't make a stink about it but you could consider removing inputs when they're exhausted right? But I won't make a stink about it.


pkg/sql/rowflow/input_sync.go, line 114 at r3 (raw file):

func (s *orderedSynchronizer) Less(i, j int) bool {
	// If we're not enforcing any ordering between rows, let's consume sources in
	// their index order.

nit: extra conditional on every row is kinda sadface - can we instead swap out the Less implementation at constructor time? or just make another copy of the synchronizer like you did for the col one?

@jordanlewis jordanlewis requested a review from yuzefovich October 4, 2019 18:12
Copy link
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me as well. You will also add the tests for the bugs that are being fixed, right?

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @andreimatei and @jordanlewis)


pkg/sql/distsql_running.go, line 352 at r4 (raw file):

	// since they might have mutations), and the RootTxn does not permit concurrency.
	// For such flows, we were supposed to have fused everything.
	if txn != nil && planCtx.isLocal && flow.ConcurrentExecution() {

nit: it is unusual to see a single opening parenthesis at the end of the line (several lines above).


pkg/sql/colexec/serial_unordered_synchronizer.go, line 62 at r3 (raw file):

Previously, jordanlewis (Jordan Lewis) wrote…

This is unnecessary (I think and hope) - it's handled by the CancelChecker which is always instantiated below the scan operators.

Yeah, I also think this is unnecessary.


pkg/sql/colexec/serial_unordered_synchronizer.go, line 28 at r4 (raw file):

	// curSerialInputIdx is used if parallel is false. It indicates the index of
	// the current input being consumed.
	curSerialInputIdx int

nit: the comment above seems to be out-of-date.


pkg/sql/colflow/vectorized_flow.go, line 85 at r4 (raw file):

// ConcurrentExecution is part of the Flow interface.
func (f *vectorizedFlow) ConcurrentExecution() bool {
	return f.operatorConcurrency || f.FlowBase.ConcurrentExecution()

The second part of this conditional is always (at least right now) false for the vectorized flows, but I guess it doesn't matter.


pkg/sql/distsql/server.go, line 393 at r4 (raw file):

	// This will directly by the flow if the flow has no concurrency. If there is
	// concurrency, a LeafTxn will be created.
	Txn *client.Txn

nit: a few words are missing, maybe "This will be used directly ..." (above)


pkg/sql/physicalplan/physical_plan.go, line 1132 at r4 (raw file):

	for i := 0; i < len(p.ResultRouters); i++ {
		pIdx := p.ResultRouters[i]
		node := p.Processors[p.ResultRouters[i]].Node

pkg/sql/rowflow/row_based_flow.go, line 111 at r4 (raw file):

						// If it's an orderedSynchronizer, the we look inside it to see if
						// the processor we're trying to fuse feeds into it.
						orderedSync, ok := inputSyncs[pIdx][inIdx].(*orderedSynchronizer)

nit: s/the we/then we/ (above).

@andreimatei andreimatei force-pushed the distsql.no-concurrency branch from c07ebc4 to 71d1936 Compare October 4, 2019 20:18
Copy link
Contributor Author

@andreimatei andreimatei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've isolated a commit (r6) for clarifying the various isLocal fields and for unifying the handling of queries that were forced to be planned locally with ones that happened to not have any remote flows (for whatever reason).
I've reworded the commit message on r9 to remove any references to remote flows. That was FUD; I had failed to read the code properly.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @andreimatei, @jordanlewis, @RaduBerinde, and @yuzefovich)


pkg/sql/distsql_running.go, line 156 at r3 (raw file):

Previously, RaduBerinde wrote…

[nit] Doesn't the latter imply the former? Perhaps we should set this outside of the loop and assert that there is a single flow. There are a few similar instances below. Maybe we should move this into a helper function that gets the list of flows and the localstate.

done
I didn't add a helper. The other guys besides this one are randos that don't really matter, and also not completely analogous to this case.


pkg/sql/distsql_running.go, line 352 at r4 (raw file):

Previously, yuzefovich wrote…

[nit]: it is unusual to see a single opening parenthesis at the end of the line (several lines above).

Done.


pkg/sql/distsql_running.go, line 353 at r4 (raw file):

Previously, jordanlewis (Jordan Lewis) wrote…

Can you make this an "internal error"? use AssertionErrorf.

Done.


pkg/sql/colexec/serial_unordered_synchronizer.go, line 23 at r3 (raw file):

Previously, RaduBerinde wrote…

[nit] Add some context as to why it exists, maybe point at the relevant issue #s.

added some words


pkg/sql/colexec/serial_unordered_synchronizer.go, line 30 at r3 (raw file):

Previously, RaduBerinde wrote…

[nit] add type assertions so it's clear what interface(s) it's supposed to implement

done


pkg/sql/colexec/serial_unordered_synchronizer.go, line 62 at r3 (raw file):

Previously, yuzefovich wrote…

Yeah, I also think this is unnecessary.

Done.


pkg/sql/colexec/serial_unordered_synchronizer.go, line 71 at r3 (raw file):

Previously, jordanlewis (Jordan Lewis) wrote…

I won't make a stink about it but you could consider removing inputs when they're exhausted right? But I won't make a stink about it.

meh, I like it more this way (with immutable inputs)


pkg/sql/colexec/serial_unordered_synchronizer.go, line 28 at r4 (raw file):

Previously, yuzefovich wrote…

[nit]: the comment above seems to be out-of-date.

Done.


pkg/sql/colflow/vectorized_flow.go, line 407 at r3 (raw file):

Previously, RaduBerinde wrote…

Add a comment here, maybe point to the issue #s.

done


pkg/sql/colflow/vectorized_flow.go, line 85 at r4 (raw file):

Previously, yuzefovich wrote…

The second part of this conditional is always (at least right now) false for the vectorized flows, but I guess it doesn't matter.

yeah, I went back and forth, but I'd leave it like this


pkg/sql/distsql/server.go, line 361 at r4 (raw file):

Previously, RaduBerinde wrote…

This block is used 3 times, should be a helper

I've moved this stuff back to Server.setupFlow().


pkg/sql/distsql/server.go, line 393 at r4 (raw file):

Previously, yuzefovich wrote…

[nit]: a few words are missing, maybe "This will be used directly ..." (above)

done


pkg/sql/rowflow/input_sync.go, line 368 at r3 (raw file):

Previously, RaduBerinde wrote…

Add more context as to why you would want that, maybe refer to FuseAggressively.

done


pkg/sql/rowflow/row_based_flow.go, line 129 at r3 (raw file):

Previously, RaduBerinde wrote…

[nit] Would be more readable if we put this first under a if len(in.Streams) == 1 check (we won't need the else).

done


pkg/sql/rowflow/row_based_flow.go, line 154 at r3 (raw file):

Previously, RaduBerinde wrote…

[nit] don't copy each spec, do pspec := &spec.Processors[i]

done


pkg/sql/rowflow/row_based_flow.go, line 156 at r3 (raw file):

Previously, RaduBerinde wrote…

Shouldn't this be continue ? (same below)

well this should never happen (cause we don't have procs with multiple outputs, right?). But changed.


pkg/sql/rowflow/row_based_flow.go, line 276 at r3 (raw file):

Previously, RaduBerinde wrote…

what's numLocal for?

nothing; leftover. removed.


pkg/sql/rowflow/row_based_flow.go, line 289 at r3 (raw file):

Previously, RaduBerinde wrote…

[nit] you can do ordering := sqlbase.NoOrdering and flip theif

done


pkg/sql/rowflow/row_based_flow.go, line 162 at r4 (raw file):

			// The output is not pass-through and thus is being sent through a
			// router.
			return nil

this one should be a continue, yeah

Copy link
Contributor Author

@andreimatei andreimatei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will also add the tests for the bugs that are being fixed, right?

I wasn't planning to. The only test that makes sense is the test that there's no concurrency on a RootTxn, and that's what we have with the assertion in DistSQLPlanner.Run().
Since we've eliminated this concurrency, there's no timings I can play with any more to force a bad scenario. So the type of test I would have written below to demonstrate problems (e.g. have a union and block one side until the other one encounters a retriable error) would now be fairly non-sensical to write.

What's generally needed is an extension of Jepsen to more complex SQL queries, but that's big ask :)
So I'm thinking about it, but not sure what to do about it. Other than talk to Radu about stressing by hand the FK checks that showed problems initially, but I'm unsure about the current status of the FK checks.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @andreimatei, @jordanlewis, @RaduBerinde, and @yuzefovich)

@andreimatei andreimatei force-pushed the distsql.no-concurrency branch from 71d1936 to b5dc7cc Compare October 5, 2019 02:02
Before this patch, queries that we didn't intend to distributed were
resulting in a single gateway flow that was using the RootTxn. Queries
that we did intend to distribute but where we didn't end up actually
distributing (e.g. because all the data was local, in particular when
running on a single node) were using a LeafTxn.
This patch makes the behavior uniform - if we ended up with a single
flow, for whatever reason, use the RootTxn.

Release justification: Simplifies things for next commits.

Release note: None
... to ParallelUnorderedSynchronizer, to make room for the upcoming
SerialUnorderedSynchronizer.

Release justification: just a rename

Release note: None
This patch makes it so that we can optionally fuse the inputs into
unordered and ordered sync with the sync (and also with the sync's
consumer).

Before this patch, the fusing logic was bailing on fusing ordered syncs
for no reason (other than code complexity). This patch embraces the
complexity.

Before this patch, producers of unordered syncs were always run in
parallel. This patch makes it so that they're optionally serialized
(i.e. each source is consumed before moving on to the next source). The
option is taken in case a query ends up running entirely on the gateway
(either because it was forced to run on the gateway or because all the
data happens to be on the gateway). If that's the case, then the
concurrency was not giving us much. Dissallowing concurrency in these
cases fixes cockroachdb#40487 for "regular queries": concurrent use of a Root txn
is not kosher and some queries planned entirely on the gateway need to
use a Root (i.e.  mutations). Everything going through the "normal"
planning process is now asserted to not result in any concurrency if it
resulted in a single flow (on the gateway).

The serialization of row-based unordered syncs is done by implementing
them through an orderedSync with no ordering. For vectorized ones, I've
created a new SerialUnorderedSynchronizer.

Release justification: Fixes bug.

Release note: None
Before this patch, a DistSQL flow running on its gateway node would use
the RootTxn for all its processors for row-based flows / all of its
operators for vectorized flows if there are no remote flows. Some of
these processors/operator can execute concurrently with one another.
RootTxns don't support concurrent requests (see cockroachdb#25329), resulting in
some reads possibly missing to see the transaction's own writes.

This patch fixes things by using a LeafTxn on the gateway in case
there's concurrency on the gateway or if there's any remote flows. In
other words, the Root is used only if there's no remote flows and no
concurrency. This is sufficient for supporting mutations (which need the
Root), because mutations force everything to be planned on the gateway
and so, thanks to the previous commit, there's no concurrency if that's
the case.

Fixes cockroachdb#40487
Touches cockroachdb#24798

Release justification: Fixes bad bugs.

Release note: Fix a bug possibly leading to transactions missing to see
their own previous writes (cockroachdb#40487).
@andreimatei andreimatei force-pushed the distsql.no-concurrency branch from b5dc7cc to eb51c4f Compare October 5, 2019 02:42
Copy link
Contributor Author

@andreimatei andreimatei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging so @knz can start a beta in the morning
bors r+

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @andreimatei, @jordanlewis, @RaduBerinde, and @yuzefovich)


pkg/sql/rowflow/input_sync.go, line 114 at r3 (raw file):

Previously, jordanlewis (Jordan Lewis) wrote…

nit: extra conditional on every row is kinda sadface - can we instead swap out the Less implementation at constructor time? or just make another copy of the synchronizer like you did for the col one?

I don't think that's worth it... This input sync is a fat cat anyway, this extra comparison will be lost in the noise. In the lean and mean vectorized world, that's a separate story...

craig bot pushed a commit that referenced this pull request Oct 5, 2019
41307: sql: fix various problematic uses of the txn in DistSQL flows r=andreimatei a=andreimatei

see individual commits

Release justification: Fixes bad bugs.

Co-authored-by: Andrei Matei <[email protected]>
Copy link
Contributor Author

@andreimatei andreimatei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @andreimatei, @jordanlewis, @RaduBerinde, and @yuzefovich)


pkg/sql/rowflow/row_based_flow.go, line 111 at r4 (raw file):

Previously, yuzefovich wrote…

[nit]: s/the we/then we/ (above).

done

@craig
Copy link
Contributor

craig bot commented Oct 5, 2019

Build succeeded

@craig craig bot merged commit eb51c4f into cockroachdb:master Oct 5, 2019
RaduBerinde added a commit to RaduBerinde/cockroach that referenced this pull request Oct 5, 2019
This reverts commit a34d705.

Release justification: recently merge fix no longer needed (thanks
to cockroachdb#41307).

Release note (sql change): Mutations under UNION or UNION ALL are
allowed again.
andreimatei added a commit to andreimatei/cockroach that referenced this pull request Oct 7, 2019
This reverts commit 1c99165, reversing
changes made to e6e9161.

Somehow cockroachdb#41307 broke some Jepsen tests. Reversing while I investigate.

Fixes cockroachdb#41376
Fixes cockroachdb#41364
Fixes cockroachdb#41363
Fixes cockroachdb#41362

Release justification: broke Jepsen

Release note: None
craig bot pushed a commit that referenced this pull request Oct 7, 2019
41399: sql/pgwire: fix BenchmarkWriteBinary{Int,Float} r=nvanbenschoten a=nvanbenschoten

Before this fix, the benchmark was always hitting an error because it was
forgetting to pass an OID `writeBuffer.writeBinaryDatum`. This commit fixes
the benchmark and checks the error to make sure we catch bugs like this in
the future.

Release justification: Testing only.

Release note: None

41400: disable release justification hint and lint. r=RaduBerinde a=RaduBerinde

This effectively disables commit feeaf62.

The functionality is moved behind flags so it can easily be revived
for next release.

Release justification: how ironic.

Release note: None

41403: sql/pgwire: avoid new memory allocation in writeTextDatum(Date) r=nvanbenschoten a=nvanbenschoten

3dfd6cb introduced a performance regression in the speed of encoding
Date datums to their text representation. This commit partially avoids
the regression.

```
name              old time/op  new time/op  delta
WriteTextDate-16   446ns ± 4%   318ns ± 1%  -28.75%  (p=0.000 n=10+9)
```

Release justification: Avoids performance regression.

Release note: None

41406: Revert "Merge #41307" r=andreimatei a=andreimatei

This reverts commit 1c99165, reversing
changes made to e6e9161.

Somehow #41307 broke some Jepsen tests. Reversing while I investigate.

Fixes #41376
Fixes #41364
Fixes #41363
Fixes #41362

Release justification: broke Jepsen

Release note: None

Co-authored-by: Nathan VanBenschoten <[email protected]>
Co-authored-by: Radu Berinde <[email protected]>
Co-authored-by: Andrei Matei <[email protected]>
andreimatei added a commit to andreimatei/cockroach that referenced this pull request Oct 7, 2019
This reverts commit 1c99165, reversing
changes made to e6e9161.

Somehow cockroachdb#41307 broke some Jepsen tests. Reversing while I investigate.

Fixes cockroachdb#41376
Fixes cockroachdb#41364
Fixes cockroachdb#41363
Fixes cockroachdb#41362

Release justification: broke Jepsen

Release note: None
craig bot pushed a commit that referenced this pull request Oct 7, 2019
41413: release-19.2: Revert "Merge #41307" r=andreimatei a=andreimatei

Backport 1/1 commits from #41406.

/cc @cockroachdb/release

---

This reverts commit 1c99165, reversing
changes made to e6e9161.

Somehow #41307 broke some Jepsen tests. Reversing while I investigate.

Fixes #41376
Fixes #41364
Fixes #41363
Fixes #41362

Release justification: broke Jepsen

Release note: None


Co-authored-by: Andrei Matei <[email protected]>
@andreimatei andreimatei deleted the distsql.no-concurrency branch October 8, 2019 22:16
craig bot pushed a commit that referenced this pull request Oct 10, 2019
41356: Revert "opt: disallow mutations under union" r=RaduBerinde a=RaduBerinde

This reverts commit a34d705.

Release justification: recently merge fix no longer needed (thanks
to #41307).

Release note (sql change): Mutations under UNION or UNION ALL are
allowed again.

41358: sql/logictest: add logictest for all expected 1PC txn statements r=nvanbenschoten a=nvanbenschoten

First commit from #41324.

We expect a selection of simple single-statement mutations to hit the
"1-phase commit" transaction fast-path. #41320 demonstrated how critical
this is, as regressions here can cause major (> 50%) performance hits to
benchmarks and user workloads. This commit adds a logic test to validate
that these statements continue to hit this fast-path.

Release justification: Testing only.

41371: kv: avoid allocations in client.Txn constructor r=nvanbenschoten a=nvanbenschoten

This PR contains two small wins that help speed up the client.Txn constructor, which is responsible for **2.90%** of a CPU profile when running Sysbench's `oltp_point_select` workload. The biggest win here will come from addressing #32508.

#### kv: lazily create *RangeIterator in txnPipeliner

This allocation was responsible for **0.34%** of a CPU profile when running Sysbench's `oltp_point_select` workload.

#### kv: only re-alloc refresh spans in augmentMetaLocked if necessary

This was responsible for **0.057%** of a CPU profile when running Sysbench's `oltp_point_select` workload.

Release justification: None. These can wait for the branch to split.

41372: sql/pgwire: statically allocate format code slice for all text args/cols r=nvanbenschoten a=nvanbenschoten

This allocation was responsible for **0.8%** of a CPU profile when running
Sysbench's oltp_point_select workload.

Release justification: Probably none, although this does look very safe.

Release note: None

41379: pkg/sql: use ring.Buffer in StmtBuf r=nvanbenschoten a=nvanbenschoten

The StmtBuf has the exact access patterns typically associated with a ring buffer. Command instances are added to the back of the buffer and trimmed from the front of the buffer. These operations are often performed in lockstep, but that is not always the case, so we need the buffer to be able to grow.

`ring.Buffer` provides exactly these semantics and it allows us to avoid memory allocations on each Command in `StmtBuf.Push`.

Release justification: None. Don't merge until branch is split.

Co-authored-by: Radu Berinde <[email protected]>
Co-authored-by: Nathan VanBenschoten <[email protected]>
RaduBerinde added a commit to RaduBerinde/cockroach that referenced this pull request Oct 14, 2019
This reverts commit a34d705.

Release justification: recently merge fix no longer needed (thanks
to cockroachdb#41307).

Release note (sql change): Mutations under UNION or UNION ALL are
allowed again.
craig bot pushed a commit that referenced this pull request Oct 14, 2019
41500: release-19.2: Revert "opt: disallow mutations under union" r=RaduBerinde a=RaduBerinde

Backport 1/1 commits from #41356.

/cc @cockroachdb/release

---

This reverts commit a34d705.

Release justification: recently merged fix no longer needed (thanks
to #41307).

Release note (sql change): Mutations under UNION or UNION ALL are
allowed again.


Co-authored-by: Radu Berinde <[email protected]>
sumeerbhola pushed a commit to sumeerbhola/cockroach that referenced this pull request Oct 21, 2019
This reverts commit 1c99165, reversing
changes made to e6e9161.

Somehow cockroachdb#41307 broke some Jepsen tests. Reversing while I investigate.

Fixes cockroachdb#41376
Fixes cockroachdb#41364
Fixes cockroachdb#41363
Fixes cockroachdb#41362

Release justification: broke Jepsen

Release note: None
knz added a commit to knz/cockroach that referenced this pull request Nov 10, 2019
Prior to this patch, the release note script would skip over
standalone commits (without a PR) when extracting release notes.
This was defective, as the git history does have a few example
standalone commits, with release note but without PR.

Additionally, the script now reports PRs that are missing release
notes *or only use 'Release note: none'*, which may indicate
that the engineer did not bother filling in a note despite the
presence of a user-facing change.

For example:

```
$ python3 scripts/release-notes.py \
    --from v19.2.0-beta.20190930 \
    --until provisional_201911080435_v19.2.0-rc.5
```

Outputs (snippet):

- Andrei Matei:
  - 2019-10-04 [cockroachdb#41303][cockroachdb#41303] [ca32e6f][ca32e6f] sql: remove dead code [NO RELEASE NOTE]
  - 2019-10-05 [cockroachdb#41307][cockroachdb#41307] [1c99165][1c99165] sql: fix various problematic uses of the txn in DistSQL flows (4 commits)
  - 2019-10-28 [cockroachdb#41935][cockroachdb#41935] [bad8e55][bad8e55] settings/cluster: introducing the 19.2 cluster version [NO RELEASE NOTE]

In this example, the first PR has no release note but does not deserve
one. The second has a release note. The third is marked with "Release
note: None" but **there should really have been a release note**: the
introduction of the major cluster version is an important user-facing
change and should be announced.

By highlighting the missing release notes in this way, the script
gives an opportunity to the doc writer(s) to find additional
user-facing changes that need to be documented.

[cockroachdb#41303]: cockroachdb#41303
[cockroachdb#41307]: cockroachdb#41307
[cockroachdb#41935]: cockroachdb#41935
[ca32e6f]: cockroachdb@ca32e6ff0
[1c99165]: cockroachdb@1c99165c3
[bad8e55]: cockroachdb@bad8e55bb

Release note: None
knz added a commit to knz/cockroach that referenced this pull request Nov 12, 2019
Prior to this patch, the release note script would skip over
standalone commits (without a PR) when extracting release notes.
This was defective, as the git history does have a few example
standalone commits, with release note but without PR.

Additionally, the script now reports PRs that are missing release
notes *or only use 'Release note: none'*, which may indicate
that the engineer did not bother filling in a note despite the
presence of a user-facing change.

For example:

```
$ python3 scripts/release-notes.py \
    --from v19.2.0-beta.20190930 \
    --until provisional_201911080435_v19.2.0-rc.5
```

Outputs (snippet):

- Andrei Matei:
  - 2019-10-04 [cockroachdb#41303][cockroachdb#41303] [ca32e6f][ca32e6f] sql: remove dead code [NO RELEASE NOTE]
  - 2019-10-05 [cockroachdb#41307][cockroachdb#41307] [1c99165][1c99165] sql: fix various problematic uses of the txn in DistSQL flows (4 commits)
  - 2019-10-28 [cockroachdb#41935][cockroachdb#41935] [bad8e55][bad8e55] settings/cluster: introducing the 19.2 cluster version [NO RELEASE NOTE]

In this example, the first PR has no release note but does not deserve
one. The second has a release note. The third is marked with "Release
note: None" but **there should really have been a release note**: the
introduction of the major cluster version is an important user-facing
change and should be announced.

By highlighting the missing release notes in this way, the script
gives an opportunity to the doc writer(s) to find additional
user-facing changes that need to be documented.

[cockroachdb#41303]: cockroachdb#41303
[cockroachdb#41307]: cockroachdb#41307
[cockroachdb#41935]: cockroachdb#41935
[ca32e6f]: cockroachdb@ca32e6ff0
[1c99165]: cockroachdb@1c99165c3
[bad8e55]: cockroachdb@bad8e55bb

Release note: None
knz added a commit to knz/cockroach that referenced this pull request Nov 12, 2019
Prior to this patch, the release note script would skip over
standalone commits (without a PR) when extracting release notes.
This was defective, as the git history does have a few example
standalone commits, with release note but without PR.

Additionally, the script now reports PRs that are missing release
notes *or only use 'Release note: none'*, which may indicate
that the engineer did not bother filling in a note despite the
presence of a user-facing change.

For example:

```
$ python3 scripts/release-notes.py \
    --from v19.2.0-beta.20190930 \
    --until provisional_201911080435_v19.2.0-rc.5
```

Outputs (snippet):

- Andrei Matei:
  - 2019-10-04 [cockroachdb#41303][cockroachdb#41303] [ca32e6f][ca32e6f] sql: remove dead code [NO RELEASE NOTE]
  - 2019-10-05 [cockroachdb#41307][cockroachdb#41307] [1c99165][1c99165] sql: fix various problematic uses of the txn in DistSQL flows (4 commits)
  - 2019-10-28 [cockroachdb#41935][cockroachdb#41935] [bad8e55][bad8e55] settings/cluster: introducing the 19.2 cluster version [NO RELEASE NOTE]

In this example, the first PR has no release note but does not deserve
one. The second has a release note. The third is marked with "Release
note: None" but **there should really have been a release note**: the
introduction of the major cluster version is an important user-facing
change and should be announced.

By highlighting the missing release notes in this way, the script
gives an opportunity to the doc writer(s) to find additional
user-facing changes that need to be documented.

[cockroachdb#41303]: cockroachdb#41303
[cockroachdb#41307]: cockroachdb#41307
[cockroachdb#41935]: cockroachdb#41935
[ca32e6f]: cockroachdb@ca32e6ff0
[1c99165]: cockroachdb@1c99165c3
[bad8e55]: cockroachdb@bad8e55bb

Release note: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants