Skip to content

Conversation

@tgroh
Copy link
Member

@tgroh tgroh commented May 5, 2016

Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

  • Make sure the PR title is formatted like:
    [BEAM-<Jira issue #>] Description of pull request
  • Make sure tests pass via mvn clean verify. (Even better, enable
    Travis-CI on your fork and ensure the whole test matrix passes).
  • Replace <Jira issue #> in the title with the actual Jira issue
    number, if there is one.
  • If this contribution is large, please file an Apache
    Individual Contributor License Agreement.

The evaluator may be reused in a different thread, and updates to the
checkpoint must be visible.

@tgroh
Copy link
Member Author

tgroh commented May 5, 2016

R: @dhalperi

@dhalperi
Copy link
Contributor

dhalperi commented May 5, 2016

Can you say more about why? Is there a test that can add?

@tgroh tgroh force-pushed the unbounded_evaluator_close_before_requeue branch from e6ba15d to febc608 Compare May 6, 2016 21:51
@tgroh tgroh changed the title [BEAM-22] Mark CheckpointMark as volatile in UnboundedReadEvaluator [BEAM-22] Explicitly use a ConcurrentLinkedQueue in UnboundedReadEvaluatorFactory May 6, 2016
@tgroh tgroh force-pushed the unbounded_evaluator_close_before_requeue branch from febc608 to 263f436 Compare May 6, 2016 21:53
@tgroh
Copy link
Member Author

tgroh commented May 9, 2016

Updated the description; changed what's actually being implemented.

There must be a visibility restriction between uses of the evaluators - as an evaluator may be used by different threads, any update to the state of that evaluator must be visible between uses. ConcurrentLinkedQueue provides a happens-before relationship between offering an element to the queue and polling it from that queue.

As we offer the evaluator to the queue after completing any updates to the evaluator state, this ensures that reads to the value of CheckpointMark are consistent with the writes to that value.

@tgroh tgroh force-pushed the unbounded_evaluator_close_before_requeue branch from 263f436 to 05f8d88 Compare May 9, 2016 17:15
@dhalperi
Copy link
Contributor

dhalperi commented May 9, 2016

LGTM

@asfgit asfgit closed this in 31da925 May 9, 2016
iemejia pushed a commit to iemejia/beam that referenced this pull request Jan 12, 2018
pl04351820 pushed a commit to pl04351820/beam that referenced this pull request Dec 20, 2023
PEP 484 specifies that they be hinted as the type of a single element,
as seen from the caller's perspective.

Closes apache#289.

Co-authored-by: Christopher Wilcox <crwilcox@google.com>
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.

2 participants