Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
67989: cluster-ui: bump package.json version r=celiala a=celiala

In #67722, we updated peerDependencies, but forgot to bump
the version in package.json.

This fast-follow PR bumps the version for #67722.

Note: this has been preemptively backported to 21.1 and 20.2, in #67981 and #67982 respectively.


Release note: None

68088: roachtest: create perf dir for bulk roachtests r=pbardea a=pbardea

When the bulk op roachtests were updated to avoid racing when writing
their stats files, the creation of the perf directory itself was
removed. This adds it back.

There was some consideration to update PutString to create the
filepath.Dir of its destination but that refactor was left for a
potential follow up since it applies to other tests as well.

Fixes #67870.

Release note: None

68118: roachtest: bump import/tpch/nodes=8 timeout to 10h r=tbg,pbardea a=adityamaru

Previously, the roachtest had a timeout of 8h. The test
usually runs in ~7hrs but occasionally tips over the
configured time out. While we investigate the slowness
of this import as tracked in #68117,
we are bumping the timeout to 10h.

Release note: None

68119: rowexec: ask for at least 8MiB in the join reader memory limit r=yuzefovich a=yuzefovich

The join reader doesn't know how to spill to disk, so previously in some
cases (namely, when `distsql_workmem` session variable is low) the
queries would error out. Now this is temporarily fixed by requiring the
memory limit to be at least 8MiB (to accommodate 4MiB scratch input
rows). This shouldn't really matter in the production setting but makes
`tpchvec/disk` roachtest happy.

Fixes: #68036.

Release note: None

Co-authored-by: Celia La <[email protected]>
Co-authored-by: Paul Bardea <[email protected]>
Co-authored-by: Aditya Maru <[email protected]>
Co-authored-by: Yahor Yuzefovich <[email protected]>
  • Loading branch information
5 people committed Jul 27, 2021
5 parents c7e039f + 5fea281 + 09de874 + cf62288 + 306f8ed commit f45df6c
Show file tree
Hide file tree
Showing 9 changed files with 145 additions and 168 deletions.
5 changes: 4 additions & 1 deletion pkg/cmd/roachtest/tests/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,10 @@ func registerBackup(r registry.Registry) {
// Upload the perf artifacts to any one of the nodes so that the test
// runner copies it into an appropriate directory path.
dest := filepath.Join(t.PerfArtifactsDir(), "stats.json")
if err := c.PutString(ctx, perfBuf.String(), dest, 755, c.Node(1)); err != nil {
if err := c.RunE(ctx, c.Node(1), "mkdir -p "+filepath.Dir(dest)); err != nil {
log.Errorf(ctx, "failed to create perf dir: %+v", err)
}
if err := c.PutString(ctx, perfBuf.String(), dest, 0755, c.Node(1)); err != nil {
log.Errorf(ctx, "failed to upload perf artifacts to node: %s", err.Error())
}
return nil
Expand Down
16 changes: 12 additions & 4 deletions pkg/cmd/roachtest/tests/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ func registerImportTPCC(r registry.Registry) {
// Upload the perf artifacts to any one of the nodes so that the test
// runner copies it into an appropriate directory path.
dest := filepath.Join(t.PerfArtifactsDir(), "stats.json")
if err := c.PutString(ctx, perfBuf.String(), dest, 755, c.Node(1)); err != nil {
if err := c.RunE(ctx, c.Node(1), "mkdir -p "+filepath.Dir(dest)); err != nil {
log.Errorf(ctx, "failed to create perf dir: %+v", err)
}
if err := c.PutString(ctx, perfBuf.String(), dest, 0755, c.Node(1)); err != nil {
log.Errorf(ctx, "failed to upload perf artifacts to node: %s", err.Error())
}
return nil
Expand Down Expand Up @@ -172,8 +175,10 @@ func registerImportTPCH(r registry.Registry) {
// is required to confirm this. Until then, the 4 and 32 node configurations
// are removed (4 is too slow and 32 is pretty expensive) while 8-node is
// given a 50% longer timeout (which running by hand suggests should be OK).
// (10/30/19) The timeout was increased again to 8 hours.
{8, 8 * time.Hour},
// (07/27/21) The timeout was increased again to 10 hours. The test runs in
// ~7 hours which causes it to occasionally exceed the previous timeout of 8
// hours.
{8, 10 * time.Hour},
} {
item := item
r.Add(registry.TestSpec{
Expand Down Expand Up @@ -260,7 +265,10 @@ func registerImportTPCH(r registry.Registry) {
// Upload the perf artifacts to any one of the nodes so that the test
// runner copies it into an appropriate directory path.
dest := filepath.Join(t.PerfArtifactsDir(), "stats.json")
if err := c.PutString(ctx, perfBuf.String(), dest, 755, c.Node(1)); err != nil {
if err := c.RunE(ctx, c.Node(1), "mkdir -p "+filepath.Dir(dest)); err != nil {
log.Errorf(ctx, "failed to create perf dir: %+v", err)
}
if err := c.PutString(ctx, perfBuf.String(), dest, 0755, c.Node(1)); err != nil {
log.Errorf(ctx, "failed to upload perf artifacts to node: %s", err.Error())
}
return nil
Expand Down
5 changes: 4 additions & 1 deletion pkg/cmd/roachtest/tests/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,10 @@ func registerRestore(r registry.Registry) {
// Upload the perf artifacts to any one of the nodes so that the test
// runner copies it into an appropriate directory path.
dest := filepath.Join(t.PerfArtifactsDir(), "stats.json")
if err := c.PutString(ctx, perfBuf.String(), dest, 755, c.Node(1)); err != nil {
if err := c.RunE(ctx, c.Node(1), "mkdir -p "+filepath.Dir(dest)); err != nil {
log.Errorf(ctx, "failed to create perf dir: %+v", err)
}
if err := c.PutString(ctx, perfBuf.String(), dest, 0755, c.Node(1)); err != nil {
log.Errorf(ctx, "failed to upload perf artifacts to node: %s", err.Error())
}
return nil
Expand Down
14 changes: 0 additions & 14 deletions pkg/sql/execinfra/processorsbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -949,20 +949,6 @@ func NewLimitedMonitor(
return limitedMon
}

// NewLimitedMonitorNoDiskSpill is a utility function used by processors to
// create a new limited memory monitor with the given name and start it. The
// returned monitor must be closed. The limit is determined by
// SessionData.WorkMemLimit (stored inside of the flowCtx) but overridden to
// ServerConfig.TestingKnobs.MemoryLimitBytes if that knob is set.
// ServerConfig.TestingKnobs.ForceDiskSpill is ignored by this function.
func NewLimitedMonitorNoDiskSpill(
ctx context.Context, parent *mon.BytesMonitor, flowCtx *FlowCtx, name string,
) *mon.BytesMonitor {
limitedMon := mon.NewMonitorInheritWithLimit(name, GetWorkMemLimitNoDiskSpill(flowCtx), parent)
limitedMon.Start(ctx, parent, mon.BoundAccount{})
return limitedMon
}

// NewLimitedMonitorNoFlowCtx is the same as NewLimitedMonitor and should be
// used when the caller doesn't have an access to *FlowCtx.
func NewLimitedMonitorNoFlowCtx(
Expand Down
8 changes: 0 additions & 8 deletions pkg/sql/execinfra/server_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,14 +268,6 @@ func GetWorkMemLimit(flowCtx *FlowCtx) int64 {
if flowCtx.Cfg.TestingKnobs.ForceDiskSpill {
return 1
}
return GetWorkMemLimitNoDiskSpill(flowCtx)
}

// GetWorkMemLimitNoDiskSpill returns the number of bytes determining the amount
// of RAM available to a single processor or operator. This function should be
// used instead of GetWorkMemLimit if the processor cannot spill to disk,
// since ServerConfig.TestingKnobs.ForceDiskSpill is ignored by this function.
func GetWorkMemLimitNoDiskSpill(flowCtx *FlowCtx) int64 {
if flowCtx.Cfg.TestingKnobs.MemoryLimitBytes != 0 {
return flowCtx.Cfg.TestingKnobs.MemoryLimitBytes
}
Expand Down
1 change: 0 additions & 1 deletion pkg/sql/rowexec/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ go_test(
"//pkg/sql/rowcontainer",
"//pkg/sql/rowenc",
"//pkg/sql/sem/tree",
"//pkg/sql/sqlerrors",
"//pkg/sql/sqlutil",
"//pkg/sql/stats",
"//pkg/sql/types",
Expand Down
15 changes: 13 additions & 2 deletions pkg/sql/rowexec/joinreader.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,21 @@ func newJoinReader(
}
}

// We will create a memory monitor with at least 8MiB of memory limit since
// the join reader doesn't know how to spill to disk. It is most likely that
// if the target limit is below 8MiB, then we're in a test scenario and we
// don't want to error out.
const minMemoryLimit = 8 << 20
memoryLimit := execinfra.GetWorkMemLimit(flowCtx)
if memoryLimit < minMemoryLimit {
memoryLimit = minMemoryLimit
}

// Initialize memory monitors and bound account for data structures in the joinReader.
jr.MemMonitor = execinfra.NewLimitedMonitorNoDiskSpill(
flowCtx.EvalCtx.Ctx(), flowCtx.EvalCtx.Mon, flowCtx, "joinreader-mem",
jr.MemMonitor = mon.NewMonitorInheritWithLimit(
"joinreader-mem" /* name */, memoryLimit, flowCtx.EvalCtx.Mon,
)
jr.MemMonitor.Start(flowCtx.EvalCtx.Ctx(), flowCtx.EvalCtx.Mon, mon.BoundAccount{})
jr.memAcc = jr.MemMonitor.MakeBoundAccount()

if err := jr.initJoinReaderStrategy(flowCtx, columnTypes, len(columnIDs), rightCols, readerType); err != nil {
Expand Down
Loading

0 comments on commit f45df6c

Please sign in to comment.