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

More spalloc rest calls #1222

Merged
merged 90 commits into from
Mar 21, 2025
Merged

More spalloc rest calls #1222

merged 90 commits into from
Mar 21, 2025

Conversation

rowleya
Copy link
Member

@rowleya rowleya commented Mar 17, 2025

Push more through REST calls in spalloc. This avoids sending lots of UDP packets over TCP when writing data, reading data, fast writing data, fast reading data and setting up routers (the other bit that was slow).

In order to make use of the new calls, also needs:

Tested by:

@coveralls
Copy link

coveralls commented Mar 18, 2025

Coverage Status

coverage: 38.216% (-0.4%) from 38.579%
when pulling bb0cf45 on more_spalloc_rest_calls
into 2f210e6 on master.

@@ -0,0 +1,238 @@
/*
* Copyright (c) 2022 The University of Manchester
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

date

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That file was renamed, but I can change the date if desired... edge case!

@QueryParam(SIZE) int size, @Suspended AsyncResponse response);

/**
* Clear routes, reset counters and install counting filters needed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment suggests this is just clearing out old routing tables preparing new ones which is what the method name suggests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess "reset" might be better...

* Class used to manage a download. Every instance <em>must only</em> ever
* be used from one thread.
*
* @author Donal Fellows
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is brand new code tagged Donal?

@@ -0,0 +1,19 @@
/*
* Copyright (c) 2018 The University of Manchester
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

date

@@ -0,0 +1,19 @@
/*
* Copyright (c) 2018 The University of Manchester
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

date

@@ -2629,6 +2639,22 @@ public void loadSystemRouterTables(CoreSubsets monitorCores)
.loadSystemRouterTable(monitorCores);
}

@Override
public void prepareRouters(Map<Integer, DiagnosticFilter> customFilters)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep this the same as the python.

Both in names and it Filters are passed in or created here.

throws IOException, InterruptedException,
StorageException, URISyntaxException, SpinnmanException {
super(machine, db);
txrx = getTransceiver();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why a call a get method as the last call?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This keeps the transceiver for use in the function. Note the get is a get on the super. In Java, you can't do this before calling the super constructor

+ "FROM app_id ";
"SELECT app_id FROM info";

/** Get he machine dimensions. */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the

Copy link
Member

@Christian-B Christian-B left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed as far as I can without a very deep dive.

Approved pending matching python changes and a few minor typo found

@rowleya rowleya added this pull request to the merge queue Mar 21, 2025
Merged via the queue into master with commit 99ecc3d Mar 21, 2025
16 checks passed
@rowleya rowleya deleted the more_spalloc_rest_calls branch March 21, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants