[ISSUE] (TEPHRA-55) Provide a command to manually clear IDs from invalid list

2 views
Skip to first unread message

Gary Helmling (JIRA)

unread,
Feb 18, 2015, 10:19:02 PM2/18/15
to tephr...@googlegroups.com
Gary Helmling commented on an issue
 
Re: Provide a command to manually clear IDs from invalid list

A few comments on the proposal:

  • instead of overloading the method to prune a set of IDs vs. prune by time, let's use distinct method names – both for the java methods and thrift changes
  • I would replace "prune" with "truncate"
  • why have the prune by time call the prune by set method? couldn't it update the list directly and more efficiently by just checking that id < pruneTxId?
  • should we do some sanity check and not allow the pruning by time if there are any in progress transactions with id < the calculated pruneTxId?
Add Comment Add Comment
 
Tephra / Sub-task TEPHRA-55
Provide a command to manually clear IDs from invalid list
As a basic first step to support pruning invalid transactions from the invalid list, we can provide a command which will tell the TransactionService to clear a set of transaction IDs from the invalid list.

This would support the case where an administrator has manually clear all the data for an invalid transaction, or knows that the cluster has pruned ...
This message was sent by Atlassian JIRA (v6.1.5#6160-sha1:a61a0fc)
Atlassian logo

Poorna Chandra (JIRA)

unread,
Feb 19, 2015, 4:58:02 PM2/19/15
to tephr...@googlegroups.com
Poorna Chandra commented on an issue

Thanks for the review Gary!

  • instead of overloading the method to prune a set of IDs vs. prune by time, let's use distinct method names – both for the java methods and thrift changes
    • Agreed. I'll call them truncateInvalidTxnsBefore(long time) and truncateInvalidTxns(Set<Long> invalidTxnIds).
  • I would replace "prune" with "truncate"
    • Agreed.
  • why have the prune by time call the prune by set method? couldn't it update the list directly and more efficiently by just checking that id < pruneTxId?
    • I was planning on collecting all ids to be removed, and calling removeAll() method on the invalid list, so that one array resize operation would be performed.
  • should we do some sanity check and not allow the pruning by time if there are any in progress transactions with id < the calculated pruneTxId?
    • Good point. I'll include it in the revised proposal.

Poorna Chandra (JIRA)

unread,
Feb 19, 2015, 6:01:03 PM2/19/15
to tephr...@googlegroups.com
Poorna Chandra edited a comment on an issue
Thanks for the review Gary!

* instead of overloading the method to prune a set of IDs vs. prune by time, let's use distinct method names -- both for the java methods and thrift changes
** Agreed. I'll call them {{
truncateInvalidTxnsBefore truncateInvalidTxBefore (long time)}} and {{ truncateInvalidTxns truncateInvalidTx (Set<Long>  invalidTxnIds  invalidTxIds )}}.
* I would replace "prune" with "truncate"
** Agreed.
* why have the prune by time call the prune by set method?  couldn't it update the list directly and more efficiently by just checking that id < pruneTxId?
** I was planning on collecting all ids to be removed, and calling {{removeAll()}} method on the invalid list, so that one array resize operation would be performed.
* should we do some sanity check and not allow the pruning by time if there are any in progress transactions with id < the calculated pruneTxId?
** Good point. I'll include it in the revised proposal.

Poorna Chandra (JIRA)

unread,
Feb 19, 2015, 8:58:02 PM2/19/15
to tephr...@googlegroups.com
Poorna Chandra updated an issue

Attaching Truncateinvalidtransactionlist-manualapproach.pdf with changes suggested.

Change By: Poorna Chandra
Attachment: Truncateinvalidtransactionlist-manualapproach.pdf

Gary Helmling (JIRA)

unread,
Feb 20, 2015, 9:35:02 PM2/20/15
to tephr...@googlegroups.com
  • why have the prune by time call the prune by set method? couldn't it update the list directly and more efficiently by just checking that id < pruneTxId?
    • I was planning on collecting all ids to be removed, and calling removeAll() method on the invalid list, so that one array resize operation would be performed.

Ok, sounds good. New design doc looks good to me.

As a basic first step to support pruning invalid transactions from the invalid list, we can provide a command which will tell the TransactionService to clear a set of transaction IDs from the invalid list.

This would support the case where an administrator has manually clear all the data for an invalid transaction, or knows that the cluster has pruned ...

Poorna Chandra (JIRA)

unread,
Feb 21, 2015, 5:19:03 PM2/21/15
to tephr...@googlegroups.com
Poorna Chandra assigned an issue to Poorna Chandra
Change By: Poorna Chandra
Assignee: Gary Helmling Poorna Chandra

Poorna Chandra (JIRA)

unread,
Mar 7, 2015, 4:18:03 AM3/7/15
to tephr...@googlegroups.com
As a basic first step to support pruning invalid transactions from the invalid list, we can provide a command which will tell the TransactionService to clear a set of transaction IDs from the invalid list.

This would support the case where an administrator has manually clear all the data for an invalid transaction, or knows that the cluster has pruned ...

Poorna Chandra (JIRA)

unread,
Mar 9, 2015, 3:51:03 PM3/9/15
to tephr...@googlegroups.com

Poorna Chandra (JIRA)

unread,
Mar 9, 2015, 3:51:03 PM3/9/15
to tephr...@googlegroups.com

Gary Helmling (JIRA)

unread,
Mar 12, 2015, 2:08:04 AM3/12/15
to tephr...@googlegroups.com
Gary Helmling resolved an issue as Fixed
 

This has been merged

Change By: Gary Helmling
Status: In Progress Resolved
Resolution: Fixed
Reply all
Reply to author
Forward
0 new messages