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

fix: update the accounting of partial batch mutations #2149

Merged
merged 32 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
reverted irrelevant changes
  • Loading branch information
ron-gal committed Mar 14, 2024
commit 9d225a35c49491993b6742f0d41024d7451ee118
Expand Up @@ -692,10 +692,14 @@ private UnaryCallable<BulkMutation, MutateRowsAttemptResult> createMutateRowsBas
GrpcCallSettings.<MutateRowsRequest, MutateRowsResponse>newBuilder()
.setMethodDescriptor(BigtableGrpc.getMutateRowsMethod())
.setParamsExtractor(
mutateRowsRequest ->
ImmutableMap.of(
new RequestParamsExtractor<MutateRowsRequest>() {
@Override
public Map<String, String> extract(MutateRowsRequest mutateRowsRequest) {
return ImmutableMap.of(
"table_name", mutateRowsRequest.getTableName(),
"app_profile_id", mutateRowsRequest.getAppProfileId()))
"app_profile_id", mutateRowsRequest.getAppProfileId());
}
})
.build(),
settings.bulkMutateRowsSettings().getRetryableCodes());

Expand Down
Expand Up @@ -120,12 +120,21 @@ public Object getTransportCode() {

// Simple wrappers for handling result futures
private final ApiFunction<List<MutateRowsResponse>, MutateRowsAttemptResult>
attemptSuccessfulCallback = responses -> handleAttemptSuccess(responses);
attemptSuccessfulCallback =
new ApiFunction<List<MutateRowsResponse>, MutateRowsAttemptResult>() {
@Override
public MutateRowsAttemptResult apply(List<MutateRowsResponse> responses) {
return handleAttemptSuccess(responses);
}
};

private final ApiFunction<Throwable, List<MutateRowsResponse>> attemptFailedCallback =
throwable -> {
handleAttemptError(throwable);
return null;
new ApiFunction<Throwable, List<MutateRowsResponse>>() {
@Override
public List<MutateRowsResponse> apply(Throwable throwable) {
handleAttemptError(throwable);
return null;
}
};

MutateRowsAttemptCallable(
Expand Down