Repository navigation
Add non-transactional bulk operations - #245
Draft
Mike Krüger (mkrueger) wants to merge 1 commit into
Draft
Mike Krüger (mkrueger) wants to merge 1 commit into
Mike Krüger (mkrueger) wants to merge 1 commit into
Conversation
Add bounded concurrent writes, selection plans, journaling, interactive bulk state, and MCP integration. Related to #107. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment on lines
+770
to
+773
| var response = new ResponseMessage(HttpStatusCode.OK) | ||
| { | ||
| Content = new MemoryStream(Encoding.UTF8.GetBytes(JsonSerializer.Serialize(new { _rid = this.Rid, partitionKey = new { paths = SinglePath } }))), | ||
| }; |
| if (ann != null && ann.Restricted) | ||
| { | ||
| helpJson["isRestricted"] = "This tool can't be run via MCP. User only."; | ||
| helpJson["isRestricted"] = cmd?.CommandName == "bulk" |
Comment on lines
+118
to
+121
| catch (Exception ex) | ||
| { | ||
| failure ??= ExceptionDispatchInfo.Capture(ex); | ||
| } |
Comment on lines
+131
to
+134
| catch (Exception ex) | ||
| { | ||
| failure ??= ExceptionDispatchInfo.Capture(ex); | ||
| } |
Comment on lines
+37
to
+42
| catch (Exception ex) | ||
| { | ||
| // The request may or may not have reached the service. | ||
| failure ??= ExceptionDispatchInfo.Capture(ex); | ||
| result = BulkOutcome.Create(operation, BulkOutcome.Uncertain, error: ex.Message); | ||
| } |
Comment on lines
+281
to
+288
| foreach (var segment in path.Split('/', StringSplitOptions.RemoveEmptyEntries)) | ||
| { | ||
| if (current.ValueKind != JsonValueKind.Object || !current.TryGetProperty(segment, out current)) | ||
| { | ||
| found = false; | ||
| break; | ||
| } | ||
| } |
| options.UnixCreateMode = UnixFileMode.UserRead | UnixFileMode.UserWrite; | ||
| } | ||
|
|
||
| return new BulkSpool(new FileStream(Path.Combine(Path.GetTempPath(), $"cosmos-bulk-{Guid.NewGuid():N}.jsonl"), options)); |
| { | ||
| private readonly DirectoryInfo directory = System.IO.Directory.CreateTempSubdirectory("cosmos-bulk-test-"); | ||
|
|
||
| public string PathFor(string name) => Path.Combine(this.directory.FullName, name); |
Code Coverage OverviewLanguages: C# C# / code-coverage/dotnetThe overall line coverage in commit f0a9b79 in the Show a line coverage summary of the most impacted files.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Work-in-progress snapshot of non-transactional bulk operations. This draft preserves the current implementation for further work and is not ready to merge.
Related to #107.