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

New file replica state is depending on the source node #1110

Open
yiiyama opened this issue Nov 2, 2017 · 0 comments
Open

New file replica state is depending on the source node #1110

yiiyama opened this issue Nov 2, 2017 · 0 comments
Assignees

Comments

@yiiyama
Copy link

yiiyama commented Nov 2, 2017

&dbexec($dbh, qq{
merge into t_xfer_replica xr using
(select xt.to_node, xt.fileid, xtd.time_update, fn.kind
from t_xfer_task_harvest xth
join t_xfer_task xt on xt.id = xth.task
join t_xfer_task_done xtd on xtd.task = xth.task
join t_adm_node fn on fn.id = xt.from_node
where xtd.report_code = 0) new
on (xr.node = new.to_node and xr.fileid = new.fileid)
when not matched then
insert (id, node, fileid, state, time_create, time_state)
values (seq_xfer_replica.nextval, new.to_node, new.fileid,
case when new.kind = 'MSS' then 0 else 1 end,
new.time_update, new.time_update)});

New entries to t_xfer_replica are created by FilePump. The state field is set to 0 or 1 depending on the kind of the source node. I think new.kind was supposed to be the kind of the destination node (which would make more sense from the name new too..).

If this is the case, I think we also need to go in to TMDB and set the state of all file replicas on Disk and Buffer nodes to 1. About half of replicas on Disk and almost all of them on Buffer are state 0 at the moment.

Just to make sure, I grepped the entire repository for parts that are dealing with t_xfer_replica.state. The only component that would ever set state to 0 is Stager, which I believe should be handling only MSS nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants