Allow Removing Issues From A Live Batch
Introduction
In the context of live batch processing, it is often necessary to remove issues from a batch that is currently live, but not yet archived. This can be a complex process, especially when dealing with large batches and multiple issues. In this article, we will explore a simple use-case for live issue editing and propose a solution for removing issues from a live batch.
The Problem
When a batch is live, it is not yet archived, and files are still on disk. In this scenario, we need to remove some issues from the batch, but we are okay with republishing it with those issues removed. We also need to deal with the removed issues in the NCA (Notification Center Application) some other time.
Requirements
To address this issue, we need to implement the following features:
- Flagging a live batch as "bad": We need to add a function to flag a live batch as "bad" or "in-review". This will indicate that the batch is being worked on and needs attention.
- Selecting issues for removal: We need to provide a way to select individual issues for removal from the batch.
- Rebuilding the batch with good issues: We need to rebuild the batch with the good issues and put the bad issues into the NCA error queue.
- Purging the previous batch: We need to purge the previous batch to make way for the new one.
- Loading the new batch: We need to load the new batch into the system.
Solution
To solve this problem, we will need to implement the following components:
1. New Batch Status or Flag
We need to introduce a new batch status or flag to indicate that a batch is live, but being worked on. This will help us to identify batches that are in the process of being edited.
Option 1: New Batch Status
We can introduce a new batch status, such as "in-review" or "being edited". This status will indicate that the batch is live, but being worked on.
Option 2: New Flag
Alternatively, we can introduce a new flag, such as "is_in_review" or "is_being_edited". This flag will indicate that the batch is live, but being worked on.
2. Flagging Issues for Removal
We need to provide a way to flag issues for removal from the batch. We can use a new table, such as the "in-review issue flagging" table, to store the issues that need to be removed.
Option 1: New Table
We can create a new table, such as "issue_flags", to store the issues that need to be removed. This table will have a foreign key to the "issues" table and will store the flagging information.
Option 2: Same Table
Alternatively, we can use the same table, such as "issues", to store the flagging information. We can add a new column, such as "is_in_review", to indicate that the issue needs to be removed.
3. Rebuilding the Batch with Good Issues
We need to rebuild the batch with the good issues and put the bad issues into the NCA error queue. We can create a pipeline to achieve this.
Pipeline
The pipeline will consist of the following steps:
- Get the good issues: Get the issues that are not flagged for removal.
- Rebuild the batch: Rebuild the batch with the good issues.
- Put the bad issues into the NCA error queue: Put the bad issues into the NCA error queue.
- Purge the previous batch: Purge the previous batch to make way for the new one.
- Load the new batch: Load the new batch into the system.
Implementation
To implement the solution, we will need to create the following components:
- New batch status or flag: Create a new batch status or flag to indicate that a batch is live, but being worked on.
- Issue flagging table: Create a new table to store the issues that need to be removed.
- Pipeline: Create a pipeline to rebuild the batch with the good issues and put the bad issues into the NCA error queue.
Benefits
The proposed solution will provide the following benefits:
- Improved batch editing: The solution will allow us to edit batches in a more efficient and effective way.
- Reduced errors: The solution will reduce the number of errors that occur during batch editing.
- Improved user experience: The solution will provide a better user experience for batch editors.
Conclusion
Introduction
In our previous article, we explored a simple use-case for live issue editing and proposed a solution for removing issues from a live batch. In this article, we will answer some frequently asked questions (FAQs) related to the solution.
Q: What is the purpose of the new batch status or flag?
A: The new batch status or flag is used to indicate that a batch is live, but being worked on. This helps to identify batches that are in the process of being edited.
Q: Why do we need a new table for issue flagging?
A: We need a new table for issue flagging to store the issues that need to be removed. This allows us to keep track of the issues that are being edited and ensures that they are not included in the rebuilt batch.
Q: Can we use the same table for issue flagging?
A: Yes, we can use the same table for issue flagging. We can add a new column to the existing table to store the flagging information.
Q: What is the pipeline for rebuilding the batch with good issues?
A: The pipeline for rebuilding the batch with good issues consists of the following steps:
- Get the good issues: Get the issues that are not flagged for removal.
- Rebuild the batch: Rebuild the batch with the good issues.
- Put the bad issues into the NCA error queue: Put the bad issues into the NCA error queue.
- Purge the previous batch: Purge the previous batch to make way for the new one.
- Load the new batch: Load the new batch into the system.
Q: How does the pipeline ensure that the bad issues are removed?
A: The pipeline ensures that the bad issues are removed by putting them into the NCA error queue. This prevents them from being included in the rebuilt batch.
Q: Can we customize the pipeline to fit our specific needs?
A: Yes, we can customize the pipeline to fit our specific needs. We can add or remove steps as necessary to ensure that the pipeline meets our requirements.
Q: What are the benefits of using this solution?
A: The benefits of using this solution include:
- Improved batch editing: The solution allows us to edit batches in a more efficient and effective way.
- Reduced errors: The solution reduces the number of errors that occur during batch editing.
- Improved user experience: The solution provides a better user experience for batch editors.
Q: How do we implement the solution?
A: To implement the solution, we need to create the following components:
- New batch status or flag: Create a new batch status or flag to indicate that a batch is live, but being worked on.
- Issue flagging table: Create a new table to store the issues that need to be removed.
- Pipeline: Create a pipeline to rebuild the batch with the good issues and put the bad issues into the NCA error queue.
Conclusion
In conclusion, the proposed solution for removing issues from a live batch provides a simple and effective way to edit batches. The solution includes a new batch status or flag, an issue flagging table, and a pipeline to rebuild the batch with the good issues and put the bad issues into the NCA error queue. The solution provides several benefits, including improved batch editing, reduced errors, and improved user experience.