Skip to content

ARROW-12097: [C++] Modify BackgroundGenerator so it creates fewer threads#9808

Closed
westonpace wants to merge 1 commit intoapache:masterfrom
westonpace:feature/arrow-12097
Closed

ARROW-12097: [C++] Modify BackgroundGenerator so it creates fewer threads#9808
westonpace wants to merge 1 commit intoapache:masterfrom
westonpace:feature/arrow-12097

Conversation

@westonpace
Copy link
Copy Markdown
Member

No description provided.

@github-actions
Copy link
Copy Markdown

@westonpace westonpace force-pushed the feature/arrow-12097 branch from 5119e62 to f28735b Compare March 26, 2021 21:15
@westonpace westonpace marked this pull request as ready for review March 26, 2021 21:15
@westonpace westonpace force-pushed the feature/arrow-12097 branch from f28735b to 3aff42e Compare March 29, 2021 16:22
Copy link
Copy Markdown
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

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

Just a couple minor comments.

@westonpace westonpace force-pushed the feature/arrow-12097 branch 4 times, most recently from 6a7bad4 to 23505c8 Compare March 31, 2021 08:14
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It looks like this sometimes fails on Windows.

[ RUN      ] BackgroundGeneratorTests/BackgroundGeneratorTestFixture.BadResult/1
C:/projects/arrow/cpp/src/arrow/util/async_generator_test.cc(701): error: Failed
'_error_or_value70.status()' failed with Invalid: XYZ
[  FAILED  ] BackgroundGeneratorTests/BackgroundGeneratorTestFixture.BadResult/1, where GetParam() = true (0 ms)

The previous call does restart the background thread, so it's possible it'll get to the failing value in this call.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If it restarts it will restart on the call for 2 and the call that restarts can never fail in this test (because it doesn't restart until after it's grabbed a result from the queue).

I think what is happening is things are slowing down in just the right way so the background reader never actually fills the queue and so 5 is able to sneak in before 2 is asked for.

Either way, the fix is the same, I now allow the call for 2 to fail. Thanks for catching this.

…n a thread task per execution

ARROW-12097: WIP on new background generator

ARROW-12097: Forgot to switch the async file reader over to the new background reader

ARROW-12097: Added check to make sure we are handling invalid result from spawn.  Added some test cases

ARROW-12097: Removing leftover comment

ARROW-12097: Fixed another spot where we were ignoring a Status return value

ARROW-12097: Subtle race condition hidden by using Future<>.is_valid when it was better to just use an optional

ARROW-12097: The BadResult test could fail under certain timing conditions.  I needed to loosen up how the check interpreted success.
@westonpace westonpace force-pushed the feature/arrow-12097 branch from ad993ad to c169e34 Compare March 31, 2021 18:49
@lidavidm
Copy link
Copy Markdown
Member

lidavidm commented Apr 1, 2021

The integration job looks like a flake. I restarted the Travis job.

Copy link
Copy Markdown
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

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

Travis is still being odd but it looks unrelated to the PR (tests pass and it hangs afterwards).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants